W3L1 - HTTP Flashcards
HTTP
Hyper Text Transfer Protocol
What kind of protocol is HTTP?
Client-server
Used by clients to retrieve or invoke actions on resources
Text Based
Client sends request, server supplies response
HTTP Request Format?
Header (printable ascii with specific end of line sequence
- Request line - Method / protocol/ version -
GET/HTTP/1.1
- Fields describing request and request
Empty line
Optional body (binary data)
HTTP Response format?
Header (printable ascii with specific end of line sequence
- Response line - Protocol, version, status code -
HTTP/ 1.1 200 OK
- Fields describing the server content
Empty line
Optional body
Response codes HTTP?
1xx (Informational): Request received, continuing process
2xx (Successful): Request received, understood and accepted
3xx (Redirection): Firth action needs to be taken to complete request
4xx (Client Error): The request contains bad syntax or cannot be fulfilled
5xx (Server Error): The server failed to fulfil an apparently valid request