Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTful endpoint naming #151

Open
tbtommyb opened this issue Oct 18, 2018 · 0 comments
Open

RESTful endpoint naming #151

tbtommyb opened this issue Oct 18, 2018 · 0 comments
Assignees
Labels

Comments

@tbtommyb
Copy link

Endpoints like app.get("/api/history/:station") and app.get("/api/history/:station/case/:id") are well-named but ones like app.post("/api/add-case/:station") are a little confusing.

Generally it is good to try and only refer to the resource name in the end point and then specify the behaviour you want with the HTTP verb. So adding a case to a station would be via a POST to something like /api/stations/:stationId/case.

@sima-qian sima-qian self-assigned this Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants