A request from a browser to a server includes the following information:
A browser can request information using a number of methods. The commonly used methods are:
GET — Requests the specified resource, such as a document or image
HEAD — Requests only the header information for the document
POST — Requests that the server accept some data from the browser, such as form input for a CGI program
PUT — Replaces the contents of a server’s document with data from the browser
The browser can send headers to the server. Most of these request headers are optional. This section lists some of the commonly used request headers.
File types the browser can accept.
Used if the browser wants to authenticate itself with a server. Information such as the user name and password are included.
Name and version of the browser software.
URL of the document.
Internet host and port number of the resource being requested.
If the browser has made a POST or PUT request, it sends data after the blank line following the request headers. If the browser sends a GET or HEAD request, no data exists to send.