Http url format, request message introduction, protocol url

Source: Internet
Author: User

Http url format, request message introduction, protocol url

The URL format of the HTTP protocol is as follows:

Https: // host [":" port] [abs_path]: http indicates that network resources are located through HTTP; host indicates that a valid Internet host domain name or IP address 'port specifies a port number. If it is null, the default port 80 is used. abs_path specifies the URL of the requested resource. If the URL does not provide abs_path, when it is used as the request URI, it must be given in the form of "/". Generally, this work will be automatically completed by the browser.

HTTP Request Message (HttpRequest ):

An HTTP request consists of three parts:

HTTP request line: the request line starts with a method character and is separated by spaces, followed by the request URI and Protocol version. The format is: method Request-uri http -- Version CRLF (carriage return and line feed, except as the ending CRLF, separate CR or LF characters are not allowed ).

HTTP message header

HTTP Request body

HTTP Response Message (HttpResponse ):

Status line: format, HTTP-Version Status-Code Reason-Phrase CRLF

Message Header

Response body

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.