Request message requesting method and status response code in HTTP protocol

Source: Internet
Author: User
Tags response code

An HTTP request message consists of 4 parts:

      1. Request Line
      2. Request Header (header)
      3. Blank Line
      4. Request data

The general format of the request message is given:

Request methods are included in the request line, and the common request methods are:
Get: Get a resource from the server HEAD: Get the document's response from the server header POST: Send data to the server PUT: Store the requested body part on the server delete: request to delete the specified document on the server Trace: Trace request arrives at Server intermediate proxy Server options: Request server returns the request method used for the specified resource support

The request header information when searching for HTTP with Baidu:

get/s?wd=http&ie=utf-8&tn=94839763_hao_pg http/1.1Host:www.baidu.comConnection:keep-Alivepragma:no-CACHECAChe-control:no-cacheupgrade-insecure-requests:1user-agent:mozilla/5.0 (Windows NT 10.0; Win64; x64) applewebkit/537.36 (khtml, like Gecko) chrome/66.0.3359.117 Safari/537.36accept:text/html,application/xhtml+xml , APPLICATION/XML;Q=0.9,IMAGE/WEBP,IMAGE/APNG,*/*;Q=0.8REFERER:HTTPS://WWW.BAIDU.COM/S?IE=UTF-8&F=8&RSV _bp=0&rsv_idx=1&tn=baidu&wd=http&rsv_pq=ef45e0e30001a4ba&rsv_t=4a37it%2b5vmcchfm% 2fqss6rl4bozax61q2pbu4cta1x9ro%2bjzyuiqi1cd%2bdwc&rqlang=cn&rsv_enter=1&rsv_sug3=5&rsv_sug1=4 &rsv_sug7=100&rsv_sug2=0&inputt=1596&rsv_sug4=1595&rsv_sug=2&__eis=1&__eist= 335accept-encoding:gzip, deflate, Braccept-language:zh-cn,zh;q=0.9,en;q=0.8cookie:
Common HTTP Status Response codes (HTTP state code) include:
1XX:100-101, Message tip 2xx:200-206, success 3xx:300-305, redirect 4xx:400-415, error class information, client error 5xx:500-505, error class information, server side error common status code:   200: Success , all the requested data is sent through the entity-body portion of the response message; OK   301: The requested URL points to a resource that has been deleted, but in the response message the new location where the resource is now located is indicated by the header position; Moved Permanently   302: Similar to 301, but in the response message through location indicates the resource is now in a temporary new position; Found   304: The client issued a conditional request, but the resource on the server has not changed, the client is notified by responding to this response status code; Modified   401: Need to enter account and password authentication to access resources; unauthorized   403: request is forbidden; Forbidden   404: The server cannot find the resource requested by the client; not Found   500: Server internal error; Internal Server, Error   502: The proxy server received a pseudo-response from the backend server; bad Gateway

When using Baidu to search for HTTP, the response code for successful request:

Request url:https://www.baidu.com/s?wd=http&ie=utf-8&tn=94839763_hao_pgrequest Method:getstatus code:200 Okremote Address:163.177.151.109:443referrer Policy:no-referrer-when-downgrade

Request message requesting method and status response code in HTTP protocol

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.