REST Quiz

REST Quiz

We've learned about RESTarrow-up-right 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

Last updated