HTTP request method and response status code

Source: Internet
Author: User

Request method: GET POST HEAD PUT DELETE OPTIONS
The common method is: GET POST

Get submit can see the submitted information in the browser address bar post submission method does not appear in the address bar, relative to get method more secure head and get basically the same, but head does not return content, just confirm the status of the response, such as to confirm the existence of a picture, but do not need to get the picture, You can use the Headtrace is afraid of using the proxy, the agent changes your request, the return content is the last request information, if the same as their request information, it is not blocked to modify the Opitions back to the server support request method, because not all requests, Servers are supported or allowed access, and some servers do not allow access to opitions

Status code in the response header: used to reflect the response of the server

1XX     Information          receive request, continue processing 2xx     successful          operation received, understand and accept 3xx     redirect        in order to complete the request, further measures must be taken 4xx     client error    request syntax error , or cannot be fully received 5XX     server error    server cannot complete a valid request

For example:

  Success 301  Permanent redirect   302 Temporary redirect   304  not modified, can fetch data from cache 404  page does not exist 503  Server Unavailable  Server Internal Error

Example of a 302 Redirect: Header (' location:http://www.baidu.com '); If the data is transmitted by post, if the redirect is transmitted to another page, the data is lost, so use the second and third arguments, true, Set the status code, 307 maintain the original data, such as the header (' 01.php ', true,307), if the transfer by the Get method, there is no data loss situation

HTTP request method and response status code

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.