flask-restless icon indicating copy to clipboard operation
flask-restless copied to clipboard

Too opinionated about trailing slash on resources?

Open Datamance opened this issue 8 years ago • 1 comments

Hi, please see this issue on the jsonapi_requests library.

IMO, GET requests to http://localhost:5000/api/v1/products and http://localhost:5000/api/v1/products/ (note the ending slash) should yield a 200 response given appropriate resources in the database.

I think you and @socialwifi should work together a bit on this - having jsonapi_requests as a testing mechanism for flask_restless would be really nice, especially if I want to do load testing.

Datamance avatar Mar 31 '17 21:03 Datamance

Hi @Datamance thanks for the report. I assume the problem comes from the behavior of trailing slashes in Flask: http://flask.pocoo.org/docs/0.12/quickstart/#variable-rules Your suggestion makes sense I suppose, let me think about it.

jfinkels avatar Mar 31 '17 22:03 jfinkels