HTTP status codes (1)

Source: Internet
Author: User

HTTP Status Code, which is currently used. I used to remember several common status codes, such as 200,302,304,404,503. Generally, I only need to know these common status codes. For AJAX, REST, web crawler, robot and other programs. You still need to know other status codes. In this article, I spent more than a month summing up all the status codes. The content is too much, so I have to be patient.

The learning materials for HTTP status codes are everywhere, but they are all explained theoretically. This article describes the HTTP Status Code in the HTTP protocol and provides detailed examples of most Status codes.

To understand the status code, you should understand the meaning of the status code in the instance, otherwise you will forget it.

You can use the Fiddler tool to view HTTP Request and Response. You can also conveniently view the status code in Response. If you are not familiar with this tool, refer to the Fiddler tutorial first]

To reproduce the HTTP status code, this document uses Fiddler Composer to create a "special HTTP Request". You can refer to Fiddler Composer to create and send an HTTP Request]

What is an HTTP status code?

The HTTP status code is used by the Web server to tell the client what happened.

The status code is located in the first line of HTTP Response. A "three-digit status code" and a "status message" are returned ". "Three-digit status code" facilitates program processing, and "status message" is easier to understand.

For example, when a client requests a nonexistent URL, the Web server returns "HTTP/1.1 404 Not Found" to the browser client. The server cannot find the requested URL.

Status Code category

HTTP status codes are classified into five categories. Currently, the HTTP protocol version we use is 1.1, and the following status codes are supported. As the Protocol develops, more status codes will be defined in the HTTP specification.

Tip: If you see a status code of 518, you do not know what it means. At this time, you only need to know That 518 belongs to (5XX, server error is enough)

Common Status Codes

Generally, you only need to know the following common status codes. If you want to know more, please continue.

1XX Information Status Code

These status codes are introduced by HTTP 1.1. There is still debate over the value of these status codes (I personally have never seen or understood these status codes .)

2XX success status code

When a client initiates a request, these requests are generally successful. The server has a set of status codes that indicate success, corresponding to different types of requests.

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: 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.