Skip to content

Instantly share code, notes, and snippets.

@pwrmvspark
Forked from Shurlow/rest-express.md
Last active June 17, 2019 19:04
Show Gist options
  • Select an option

  • Save pwrmvspark/9a30a62870d314f3f9334372d78a50c5 to your computer and use it in GitHub Desktop.

Select an option

Save pwrmvspark/9a30a62870d314f3f9334372d78a50c5 to your computer and use it in GitHub Desktop.
REST & Express lesson notes

REST (Representational State Transfer)

Objectives

  • Describe the concept of resources in relation to REST and APIs
  • Identify conventions for various routes including naming convention, HTTP verbs, and status codes
  • Build RESTful routes for a given resource

Guiding Questions

  • What is a resource?

    Your answer...

  • What are the five common actions of an API? What methods and status codes are typically used for the five common actions?

    Your answer...

  • How would you build RESTful routes for the following data?

    const sandwiches = [
      {
        name: 'Sausy Sausage'
        ingredients: ['sausage', 'tangy sauce']
      },
      {
        name: 'The Godfather'
        ingredients: ['mozarella', 'tomato']
      }
    ]

    Your answer...

  • Build RESTful routes for one of the following resources: cards, dogs, engineers

    Your answer...

https://learn.co/lessons/rest-quiz

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