HTTP Flashcards
What is HTTP
HyperText Transfer Protocol
- exchanges information over the web
components inside an HTTP REQUEST
- version
- verb/method
- URL
- headers
- body
components inside an HTTP REPONSE
- version
- status code
- headers
- body
Which HTTP verbs are safe?
GET
safe: doesn’t alter the state of the server
Which HTTP verbs are idempotent?
GET, PUT, DELETE
idempotent: “non-repeatable”, sending multiple identical requests acts the same as sending just one
levels of HTTP status code
100-500
100: informational
200: success
300: redirect
400: client error
500: server error
What are the most important HTTP verbs & what do they do?
GET - retrieval
POST - create
PUT - update
DELETE - delete
What do the following HTTP status codes mean?
- 200
- 201
- 403
- 404
- 500
- 503
200: OK
201: Created
403: Forbidden
404: Not Found
500: Internal Server Error
503: Service Unavailable