Skip to content

Instantly share code, notes, and snippets.

@claustres
Forked from daffl/service-events.md
Last active January 31, 2024 10:20
Show Gist options
  • Save claustres/3d416c246ad2f2ac421fc99f6ef2ff2f to your computer and use it in GitHub Desktop.
Save claustres/3d416c246ad2f2ac421fc99f6ef2ff2f to your computer and use it in GitHub Desktop.
HTTP methods, service layer and real-time event mapping
HTTP method Service layer method Real-time event
GET /features features.find({}) -
GET /features?properties.type=building features.find({ query: { properties.type: building } }) -
GET /features/id features.get(id) -
POST /features features.create(body) features created
PUT /features/id features.update(id, body) features updated
PUT /features?properties.id=1 features.update(null, body, { query: { properties.id: 1 } }) features updated
PATCH /features/id features.patch(id, body) features patched
PATCH /features?properties.id=1 features.patch(null, body, { query: { properties.id: 1 } }) features patched
DELETE /features/id features.remove(id) features removed
DELETE /features?properties.id=1 features.remove(null, { query: { properties.id: 1 } }) features removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment