Internet _ HTTP protocol

Source: Internet
Author: User

I. Definition

HTTP is a hypertext transfer protocol that transfers hypertext from a Web server to a local browser.

Ii. Features

1. No connection: Each connection processes only one request. After the server processes the customer's request and receives the response from the client, the connection is closed. This method can save transmission time.

2. Stateless: stateless means there is no memory for transaction processing. This means that if subsequent processing requires the previous information, it must be re-transmitted, which may increase the amount of data transferred each time.

3. Independent Media: any type of data can be sent over HTTP as long as the client and the service network know how to process the data content,

Iii. HTTP message format

  Request Message format of the Client: request line, request header, blank line, and request data.

GET/hello.txt HTTP/1.1 (request line) User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 (request header) Host: www. example. comaccept-language: En, mi
(Empty rows)

(Request data, such as when a POST request is sent)


Corresponding Message format on the server: Status line, message header, blank line, response body
HTTP/1.1 200 OK (status line) Date: Mon, 27 Jul 2009 12:28:53 GMT (message header) server: apachelast-modified: Wed, 22 Jul 2009 19:15:56 gmtetag: "34aa387-d-1568eb00" Accept-ranges: bytescontent-length: 51 vary: Accept-encodingcontent-type: text/plain
(Empty rows)
<HTML> (Response Message)
<Head>
<Title> Work homepage </title>
</Html>

Iii. http request methods
Get, post, Head, delete, put, etc.

Iv. Http status code
200 -- Request successful
301 -- Resource Transfer
404 -- requested resource does not exist
500 -- Internal Server Error

1 ×: the server receives the request and the requester must continue the operation.
2 ×: The operation has been processed successfully;
3××: redirection. Further operations are required to complete the request.
4××: client error. The request contains a syntax error or the request cannot be completed
5××: server error. The server encountered an error while processing the request.


Internet _ HTTP protocol

Related Article

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.