HTTP protocol and several common status codes

Source: Internet
Author: User

Preface: Knowing that there is a kettle in the mountains, the Busan line is preferred-----film "Busan Line"

-------------------------------------------------------------------------------------------------------->

Today, let's briefly talk about the HTTP protocol and several common status codes:

First, the HTTP protocol

overview:
Hypertext Transfer Protocol (Http, Hypertext Transfer Protocol ) is one of the most widely used network protocols on the Internet. All WWW documents must comply with this standard.
HTTP is a standard (TCP) for client and server-side requests and responses. is the end user, server-side is a Web site. By using a Web browser, crawler, or other tool, the client initiates an HTTP request to the specified port on the server (the default port is 80). (We call this client) called the user agent. The answering server stores (some) resources, such as HTML files and images. This answering server (we call it) is the source server (Origin server). The
HTTP protocol uses request/response model . The client sends a request to the server that contains the requested method, URL, protocol version, and a mime-like message structure that contains the request modifier, customer information, and content. The server responds with a status line that includes the version of the message protocol, success or error encoding plus the server information, entity meta information, and possible entity content.
Features:

Supports client/server mode.
Simple and fast: When a customer requests a service from the server, it simply transmits the request method and path. the request method commonly has, POST. Each method specifies a different type of contact between the customer and the server. Because the HTTP protocol is simple, the HTTP server's program size is small, so the communication speed is fast.
Flexible: HTTP allows the transfer of any type of data object. The type being transmitted is marked by Content-type.
No connection: The meaning of no connection is to limit the processing of only one request per connection. When the server finishes processing the customer's request and receives the customer's answer, the connection is disconnected. In this way, the transmission time can be saved.
Stateless: The HTTP protocol is a stateless protocol. Stateless means that the protocol has no memory capacity for transactional processing. A lack of state means that if the previous information is required for subsequent processing, it must be re-routed, which may cause the amount of data to be transferred per connection to increase. On the other hand, it responds faster when the server does not need the previous information.
Summary: The above is the HTTP protocol the most basic overview and features, content, and are more difficult to understand, the future of the essay will be updated with the HTTP protocol related technical content.

Second, the status code

As we all know, to do web development, a number of common status code is necessary to understand, and several status code in the interview may also want to test.

  

In this, 200,304,403,404,500, is necessary to know, and in the crawler engineer this position, all these status codes must be known.

Summary: If something is wrong, please correct me.

HTTP protocol and several common status codes

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.