HTTP message Header Details

Source: Internet
Author: User

HTTP is an application-level object-oriented protocol, which is suitable for distributed hypermedia information System because of its convenient and fast way. Presented in 1990

The main features of the HTTP protocol are summarized below

1. Support client/server mode.

2. Simple and fast

The request method commonly has get, post

3. Flexible HTTP allows the transfer of any type of data object. The type being transmitted is marked by Content-type.

4. No connection mode request immediate disconnection saves transfer time

The 5.HTTP protocol is a stateless protocol that lacks the subsequent need to process the preceding information and must retransmit the value if it does not need to process the preceding information his response speed is faster

HTTP protocol Detailed URL Chapter

HTTP is a text transfer protocol, which is a stateless, application-level protocol based on request-response mode, often based on TCP connection.

http://host[":" Port][abs_path]

HTTP means to locate network resources through the HTTP protocol, host represents a legitimate Internet host domain name or IP address, port specifies a port number, and NULL uses the default value of 80;

ABS_PATH Specifies the URL of the requested resource, and if no abs_path is given in the URL, it must be given in the form of '/', which is usually done automatically by the working browser.

HTTP protocol detailed request chapter

The HTTP request consists of three parts: the request line, the message header, the request body

1, the request line begins with a method symbol, separated by a space, followed by the requested URL and version of the Protocol, in the following format: Method Request-url http-version CRLF

Where method means the request;

Request-url is a Uniform resource identifier

Http-version represents the requested HTTP protocol version

CRLF Mark Carriage return line

Request method & explanation as follows

Get request gets the resource identified by the Request-url

Post appends new data to the resource identified by Request-url

HEAD request Gets the response message header for the resource identified by Request-url

PUT Request server stores a resource and uses Request-url as its identity

Delete Request server deletes the resource identified by the Request-url

TRACE requests the server to echo received request information, primarily for testing or diagnostics

CONNECT reserved for future use

Options request query server performance, or query for resource-related choices and requirements

HTTP protocol Detailed response

The HTTP response consists of three parts, namely status navigation, message header, response body

1. HTTP Status Code text narration

1XX: Indication information--Indicates that the request has been received and continues processing

2XX: Success-Indicates that the request has been successfully received, understood, accepted

3XX: Redirect--further action is required to complete the request

4XX: Client Error--Request syntax error or request not implemented

5XX: Server-side error-the server failed to implement a legitimate request

Common Status Codes

$ OK//client request succeeded

Bad Request//client requests syntax error, not accepted by the server

401 Unauthorized//request unauthorized, this status code must be used with the Www-authenticate header domain

403 Forbidden//server receives request, but refuses to provide service

404 Not Found//requested resource does not exist

Internal Server error//server unexpected error

503 Server Unavailable//server is currently unable to process client requests for later return to normal

HTTP message Header Details

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.