Skip to content

Instantly share code, notes, and snippets.

@daffl
Last active November 27, 2018 07:46
Show Gist options
  • Save daffl/dc87a24b0c4ec326d6558cc6bed64716 to your computer and use it in GitHub Desktop.
Save daffl/dc87a24b0c4ec326d6558cc6bed64716 to your computer and use it in GitHub Desktop.
HTTP method to service layer mapping
HTTP method Service layer method
GET /messages messages.find()
GET /messages/1 messages.get(1)
POST /messages messages.create(body)
PUT /messages/1 messages.update(1, body)
PATCH /messages/1 messages.patch(1, body)
DELETE /messages/1 messages.remove(1, body)
@pavanvamsi3
Copy link

pavanvamsi3 commented Nov 27, 2018

@daffl Hi!

Why does the function messages.remove has body as a parameter?

Just messages.remove(1) would suffice, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment