The method of HTTP request with the status code

The method of HTTP request

The standard HTTP, HTTP request can use several request methods.

HTTP1.0 request defines three methods: GET, POST, and HEAD method.

HTTP1.1 five new request methods: OPTIONS, PUT, DELETE, TRACE, and CONNECT method.

GET: page information request formulated and return the entity body.

HEAD: get similar requests. Response but returned no specific content for acquiring the header.

POST: Submit data processing request to the specified resource (e.g., file submission form or upload). Data contained in the request body. POST request may result in a revision to establish and / or existing resources to new resources.

PUT: replace specific content of the document data transmitted to the client from the server.

DELETE: requests the server to delete the specified page.

CONNECT: HTTP / 1.1 protocol can be reserved for connection to the proxy server pipeline mode.

OPTIONS: allows clients to view the performance of the server.

TRACE: echo request received by the server, mainly for testing or diagnosis.

HTTP status code (common)

When visitors visit a web page, the viewer's browser sends a request to the server where the web page. When the browser receives and displays the front page, this page where the server returns a message that includes the HTTP status code header (server header) to the browser in response to the request.

English is the HTTP status code HTTP Status Code.

The following are common HTTP status codes:

  • 200-- request was successful
  • 301-- resources (web pages, etc.) is permanently transferred to another URL
  • 404 - resources (web pages, etc.) requested does not exist
  • 500 - Internal Server Error

HTTP status code classification

HTTP status code of three decimal digits, the first decimal digit status code defines the type, the two figures are not classified effect. HTTP status code is divided into five types:

1xx: information, the server receives a request, the request needs to continue.

2xx: Success, operation has been successfully received and processed.

3xx: Redirection, further action is required to complete the request.

4xx: Client Error, request contains a syntax error or unable to complete the request.

5xx: Server Error, the server error has occurred during the processing of the request.

HTTP status code portion

100: Continue --- continue. Client should continue its request.

200: OK --- the request was successful. GET and POST requests are generally used.

301: Moved Permanently --- permanent redirect.

302: Found --- Temporary redirect.

400: Syntax error Bad Request --- client request, the server can not understand.

403: Forbideen --- The server understood the request to the client's request, but is refusing to perform the request.

404: Not Found --- server can not find the resources (web) at the request of the client.

500: Internal Server Error --- internal server error and can not fulfill the request.

502: Bad Gateway --- when attempting to execute the request, a gateway or proxy server receives from the remote server in response to an invalid.

Guess you like

Origin www.cnblogs.com/rabbitli/p/10980780.html