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