Why this topic matters as it relates to the material I am studying: We use web APIs in our labs. Knowing the codes they throw out is going to be extremely useful for debugging purposes, as I found out tonight during the 10 hours I spent on lab 07. Fun times, man.
-
What does REST stand for?
- Representational State Transfer
-
REST APIs are designed around a _______.
- resource, which is any kind of of object, data, or service that can be accessed by a client.
-
What is an identifier of a resource? Give an example:
- a URI that uniquely identifies a resource.
-
What are the most common HTTP verbs?
- GET, POST, PUT, DELETE
-
What should the URIs be based on?
- Inidividual resources
-
Give an example of a good URI:
-
What does it mean to have a 'chatty' web API? Is this a good or a bad thing?
- requires consumer to make tremendous amount of distinct API calls to get needed information about a resource. It's not good.
-
What status code does a successful GET request return?
- HTTP status code: 200 (OK)
-
What status code does an unsuccessful GET request return?
- HTTP status code: 204 (No Content)
-
What status code does a successful POST request return?
- HTTP status code: 201 (Created)
-
What status code does a successful DELETE request return?
- HTTP status code: 204 (No Content)
- API's have a lot of different codes, but I feel like if I study them for a bit, I could memorize the important ones, or at least the ones that I will be using regularly.