Request and response headers for HTTP - protocol

HTTP request. When we type in the browser URL Web-browser communicates with the server specified in the URL, it uses protocol TCP / IP. Next, the browser sends a query string syntax is:

The query string.

METHOD <SP> URI <SP> HTTP / version <CRLF>

where <SP> - space, and <CRLF> - newline.

Methods HTTP.

GET - used to obtain any information specified in the request URI. He changed to a conditional GET if the title is a field with the name of If-Modified-Since.

HEAD - same as GET, but the server does not return a response body, but only the response header.

POST - used to ensure that the server received the information included in the request body as subordinate for the resource specified in the URI.

PUT - used to store the specified URI request body. If there is a URI that the request body should be considered as a modified version of this URI. After the message about successful or not successful completion of this operation.

DELETE - to delete the specified URI.

HTTP response.

In response to a client request the server sends a reply. Its structure consists of a status line, header General (General-Header), the response header (Response-Header), the title of the response body (Entity-Header) and the response of the body.

In the Request-Header contains the following fields:

Location: Contains the URI of the resource can be used to redirect the client to another URL, for example if the resource has moved to another location or to another server.

Location: http://www. newlocation/index.html Server: Information about software server

Server: Apache/1.1

WWW-Autenticate: Authentication Settings.


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: