Skip to content

Instantly share code, notes, and snippets.

@bluearth
Created April 5, 2021 16:48
Show Gist options
  • Save bluearth/19cda22b2846da96c43c37d0982cea2b to your computer and use it in GitHub Desktop.
Save bluearth/19cda22b2846da96c43c37d0982cea2b to your computer and use it in GitHub Desktop.
This cheatsheet serve as framework and language neutral reference for web application URL pattern

List

Basic URL pattern:

GET /entities

Considerations:

  1. Use content negotiation to determine whether to return the list of entity as JSON array or as HTML view

    Returns HTML view

    GET /entitites
    Accept: text/html
    

    Returns JSON array

    GET /entitites
    Accept: application/json
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment