Hypertext Transfer Protocol (HTTP)

When a browser communicates with a Web server, it sends an HTTP request to the Web server. The contents of the HTTP request specify what action the client requires the server to take. HTTP supports several methods (sometimes called ‘verbs’) that the client can specify in the request; the most commonly-used methods are GET and POST. A browser uses the GET method when it requests a Web page, and it uses the POST method when it sends data to be processed, for example when you click the Submit or Search button on a Web page.

The following is an example of the information sent back and forth between the browser and the Web server when the browser sends a GET request for http://www.example.com/index.html. Don’t worry about the detail of the request and response; this is simply to give you a flavor of what is going on inside the HTTP protocol.


-->


The first line of the request specifies the method (GET), the web page or resource (/index.html), and the protocol (HTTP 1.1). The following lines are request headers that indicate extra information to the Web server. The response contains a status line that includes the protocol (HTTP 1.1), a status code (200) and a text description of what the status code means (OK). The next few lines are response headers that contain extra information about the Web server and the Web page.

After the headers there is a blank line, followed by the actual content of the Web page. This is the real payload of the response, and it contains the information that the browser will actually display.

Comments

Popular posts from this blog

Reading and Writing Operation of SRAM

Transmission Control Protocol (TCP)

File transfer from android to linux