pathwaycom / pathway

Python ETL framework for stream processing, real-time analytics, LLM pipelines, and RAG.
https://pathway.com
Other
2.84k stars 98 forks source link

RESTful API's exposed by Pathway - should tolerate trailing slash in endpoint URI? #12

Open dxtrous opened 3 months ago

dxtrous commented 3 months ago

Is your feature request related to a problem? Please describe.

Many (most?) RESTful API endpoints out there tolerate a trailing slash or not, e.g.: https://www.codever.dev/api/public/bookmarks - 200 OK https://www.codever.dev/api/public/bookmarks/ - 200 OK Giving a 30X is a possibility, but usually both work identically either way.

Pathway RESTful API's don't seem to allow a trailing slash at all.

https://demo-document-indexing.pathway.stream/v1/statistics - 200 OK https://demo-document-indexing.pathway.stream/v1/statistics/ - 404 Not found

Describe the solution you'd like Discuss if the trailing-slash version should also work, and if so, as 30X or transparent 200. Take into account implications for route caching, etc., in the decision. If not, leave current behavior as is, and document. Either way, add explanation to docs.

Describe alternatives you've considered None

Additional context Originally reported by user Hemant on Discord: https://discord.com/channels/1042405378304004156/1047451777940852736/1217801242760314893