Lecture 5 Flashcards
HTTP is a stateless protocol. What does this mean?
Nothing is remembered between transactions
What is the structure of an HTTP message?
Initial request/response line
0 or more header lines
Empty line
Optional message body
What is the structure of an HTTP request line?
<method> <path> <version></version></path></method>
e.g.
GET path/to/file/index.html HTTP/1.0
What is the structure of an HTTP repsonse line?
<version> <code> <description></description></code></version>
e.g.
HTTP/1.0 200 OK
or HTTP/1.0 404 Not Found
A 1xx response code indicates:
an informational message
A 2xx response code indicates:
success of some kind
A 3xx response code indicates:
redirection to another url
A 4xx response code indicates:
an error on the client’s part
A 5xx response code indicates:
an error on the server’s part
What is a HEAD request?
The same as a GET request but:
only returns response headers not the actual resource
useful to check charactersitics of a resource without actuall d/ling it
What is a POST request?
Sends data to the server usually for some sort of processing
request URI is not a resource to retrieve but the program to handle the data being sent