inspectorG4dget / AnonymousFeedback

1 stars 0 forks source link

Implement RESTful semantics #39

Closed scriptbae closed 7 years ago

scriptbae commented 7 years ago

Currently, the API does not conform to RESTful semantics. An example of this is the /getSections URI, which features a name which specifies a GET endpoint (in the name), but only supports POST methods.

This would be more appropriately be a GET endpoint at /sections.

There are multiple examples of this issue across backend.py.

cannotparse commented 7 years ago

RESTful semantics aren't important. As long as we know it supplies a section, it is ok. I chose to make it only doable via post to avoid people navigating to a "api response".

This is something that even after we push this to be open source, this project wouldn't need. Call me naive, but I disagree that a endpoint with the name get should describe the exact HTTP method being used. I don't postgetsetions. Post variables are cleaner although they require using CURL for testing, its something I'm willing to do.

scriptbae commented 7 years ago

This is being addressed progressively while work is being done on #12.

scriptbae commented 7 years ago

Closed by PR #52.