HTTP Request

The HTTP request consists of four mandatory parts: the method (typically GET or POST), the URI of the request, the HTTP version and the host that this URI belongs to.

GET /this-is-the-uri HTTP/1.1
Host: www.example.com

There are a multitude of optional headers that can define exactly what the browser wants or expects:

GET /this-is-the-uri?get=vars&go=here HTTP/1.1
Host: www.example.com
Accept-encoding: gzip,deflate
Accept: text/plain, text/html
User-Agent: Mozilla/5.0 (Windows NT 6.1; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

The browser can also use the POST method, which transfers variables and data as the payload.

POST /this-is-the-uri HTTP/1.1
Host: www.example.com
Accept-encoding: gzip,deflate
Accept: text/plain, text/html
User-Agent: Mozilla/5.0 (Windows NT 6.1; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

post=url%20encoded%20data&variables=are-sent-in-the-payload

Things like saved cookies, the referring page and other browser-specific variables are also sent within the HTTP header.