pathway icon indicating copy to clipboard operation
pathway copied to clipboard

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

Open dxtrous opened this issue 1 year ago • 0 comments

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

dxtrous avatar Mar 14 '24 17:03 dxtrous