Basic knowledge of HTTP protocol

Source: Internet
Author: User
HTTP protocol detailed request chapter
There are several ways to request a method (all uppercase), and each method is interpreted as follows:
Get request gets the resource identified by the Request-uri
POST


HTTP protocol Detailed response
The HTTP response is also made up of three parts, namely: status line, message packet, response body
1, the status line format is as follows:
Http-version represents the version of the server HTTP protocol
Status-code indicates the response status code sent back by the server
Reason-phrase represents the text description of the status code
The status code consists of three digits, the first number defines the category of the response, and there are five possible values
1XX: Indication information--Indicates that the request has been received and continues processing
2XX: Success-Indicates that the request has been succeeded, understood, accepted (ok//client request succeeded)
3XX: Redirect--further action is required to complete the request
4XX: Client Error--Request syntax error or request not implemented
Error request client requests have syntax errors and cannot be understood by the server
401 Unauthorized request is not authorized, 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 Request resource does not exist
5XX: Server-side error-the server failed to implement a legitimate request
Internal Server error server has unexpected errors
503 Server Unavailable Server is currently unable to process client requests and may return to normal after some time

HTTP Common Request headers
Host (the header domain is required when sending a request) is primarily used to specify the Internet host and port number of the requested resource, which is typically extracted from the HTTP URL. The http/1.1 request must contain the host header domain or the system will return with a 400 status code
Cookie: One of the most important request headers that sends the value of a cookie to an HTTP server
User-agent: Tell the HTTP Server the name and version of the operating system and browser that the client is using

Basic knowledge of HTTP protocol

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.