HTTP protocol Summary

Source: Internet
Author: User

First, the characteristics of the HTTP protocol:

    • Simple and fast: each resource is a fixed URI
    • Flexible: The transfer of different data types can be done via an HTTP protocol
    • No connection: The connection is disconnected once and will not remain connected
    • Stateless: Customer service and server are two identities, one connection after the disconnection, the next time the connection, the server can not distinguish two times whether the same client-initiated request

Second, the HTTP method:

Get: Get Resources

Post: Transferring resources

Put: Updating resources

Delete: Deleting a resource

Head: Get message header

Three, the difference between get and post

IV. HTTP Message Format

Request message: Request line-Request method, HTTP version, URL address, request header-Some Key-value value, blank line-used to separate the request header and the request body;

Response message: Response Line--http Protocol version number, response return status code, response description, response header, response body

Five, HTTP status code

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

2XX: Success-Indicates that the request was successfully received

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

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

5XX: Service-side error-Server failed to implement legitimate request

206: Common when video files are too large, only return part

V. Persistence and pipeline

In normal mode, each HTTP request is sent, and a connection is made and disconnected after completion

Persistent connection (HTTP1.1 version support): When a keep-alive (persistent connection) is used, the keep-alive feature avoids establishing or re-establishing a connection when a subsequent request to the server is present.

Pipelining: In the case of persistent connections, all requests are packaged at once, and all responses are packaged back at once.

HTTP protocol Summary

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.