Examples of HTTP protocol

GET vs POST

Two sorts of forms: GET and POST.

Hand written Requests

Download all these examples in one file: http.zip
  • A very simple request:
    A person connects to the server using a telnet on the port 80, then asks for the first page.
    The response is chunked (header contains Transfer-Encoding: chunked) - a first group of 8e4f chars is sent, then the server sends the length of the next group, hier 0 = the end of the document
    Request/ Response
  • Request for the index.html resource on the same server (that does not exist). The Response contains the status 404 Not Found
    Request/ Response
  • Get for a resource index.php with a parameter id=123
    The response has a content-length
    Request/ Response
  • We connect to a machine having multiple hosts (host for telnet has not the same name as host) and want to access a resource.
    The response contains a redirect to a secure URL (https).
    Request/ Response