> For the complete documentation index, see [llms.txt](https://certil-remy.gitbook.io/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://certil-remy.gitbook.io/learn/javascript/asynchronous-javascript/untitled-6.md).

# REST Quiz

## REST Quiz

We've learned about [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) as it applies to web development, and now it's time to test that knowledge! Choose the best answer(s) for each question below.

???

## REST Quiz

?: Given a service that lists sandwiches, what action would we perform to get all of the sandwiches?

( ) `POST /sandwich` ( ) `GET /allsandwiches` (X) `GET /sandwiches`

?: Given the same service of sandwiches, what would the action look like if we specifically wanted a BLT?

( ) `GET /blt` (X) `GET /sandwiches/blt` ( ) `PUT /blt`

?: Given a service that returns information about cars, including the various drivers of each car, what might the URI look like for getting the second driver of the third car?

( ) /cars/1/drivers/2 ( ) /cars3drivers2 ( ) /cars/2/drivers/3 (X) /cars/3/drivers/2

?: Given the same service, what might the URL look like for getting all of the drivers of the fifth car?

( ) /cars/1/driversall ( ) /cars5/drivers (X) /cars/5/drivers ( ) /cars/5/alldrivers

?: What HTTP verb is typically used to create something new?

( ) PUT (X) POST ( ) GET ( ) DELETE

?: What HTTP verb is typically used to update something?

(X) PATCH ( ) POST ( ) GET ( ) DELETE

?: What HTTP verb is typically used to delete something?

( ) PUT ( ) POST ( ) GET (X) DELETE

???

### Resources

* [Wikipedia: REST](https://en.wikipedia.org/wiki/Representational_state_transfer)
