HTTP Learning Notes

Source: Internet
Author: User

Each message consists of three parts: starting line, header, body
(both the starting line and the header are ASCII text delimited by rows.) Each line ends with a two-character line termination sequence, including a carriage return (ASCII code 13) and a newline (ASCII code)) (\ r \ n)


Format of Request message:
<method><request-url><version>

<entity-body>

Get/test.txt http/1.1accept:text/*host:www.baidu.com

Format of the response message
<version><status><reason-phrase>

<entity-body>

http/1.0 okcontent-type:text/plaincontent-length:19hi! I ' m a message!

Common HTTP methods

Method Describe Whether the body is included
GET Get a copy of a document from the server Whether
HEAD Get the header of the response message from the server only Whether
POST Send data to the server that needs to be processed Is
PUT Store the principal part of the request on the server Is
TRACE Tracking of messages that may go through a proxy server to the server Whether
OPTIONS Decide which methods can be executed on the server Whether
DELETE Delete a document from the server Whether

Common HTTP status Codes

HTTP Learning Notes

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.