Basic concepts of HTTP (1)


1. Request message

1). Request line - General information header - request header - entity header - message body

2. Response message

1). Status line - General information header - response header - entity header - message body

3. Visit process
Basic concepts of HTTP (1)
4. Request method

1). Get: requests the specified page information and returns the entity body
 2). Post: the request may lead to the establishment of new resources and / or modification of existing resources
 3). Head: get header
 4). Options: allows the client to view the performance of the server [cross domain | custom request header]
 5). Connect: reserved for the proxy server that can change the connection to pipeline mode
 6). Delete: the request server deletes the resource identified by the request URI
 7). Trace: echo the request received by the server, mainly used for testing or diagnosis
 8). Patch: local update of known resources
 9). Put: update all known resources

5. status code

1). 1XX: indication -- indicates that the request has been received and continues processing
    100 - customer must continue to request
    101 -- the client requires the server to convert the HTTP protocol version according to the request
2). 2XX: success -- indicates that the request has been successfully received, understood and accepted
    200 - Request succeeded
    201 -- prompt to know the URL of the new file
    202 - acceptance and processing, but processing not completed
    203 - uncertain or incomplete return information
    204 -- request received, but return information is empty
    205 -- the server completes the request, and the user agent must reset the currently browsed file
    206 -- the server has completed the get request of some users
3). 3xx: redirection -- further operations are required to complete the request
    300 - resources requested can be obtained in many places
    301 - delete request data
    302 - request data found at other addresses
    303 - suggest customers to visit other URLs or access methods
    304 -- the client has executed get, but the file has not changed
    305 -- the requested resource must be obtained from the address specified by the server
    306 -- code used in the previous version of HTTP, not used in the current version
    307 - declare temporary deletion of requested resources
4). 4xx: client error -- the request has syntax error or the request cannot be implemented
    400 -- bad request, such as syntax error
    401 - request authorization failed
    402 -- keep valid chargeto header response
    403 - request not allowed
    404 - no files, queries, or URLs found
    405 - user defined method in request line field is not allowed
    406 -- the requested resource is inaccessible according to the accept drag sent by the user
    407 -- similar to 401, users must first be authorized on the proxy server
    408 -- the client did not complete the request within the user specified starvation time
    409 - the request cannot be completed for the current resource state
    410 - this resource is no longer available on the server and there is no further reference address
    411 -- the server rejects the user-defined content length property request
    412 -- one or more request header fields are wrong in the current request
    413 - the requested resource is larger than the size allowed by the server
    414 -- the requested resource URL is longer than the length allowed by the server
    415 -- request resource does not support request item format
    416 -- the request contains the range request header field. There is no range indication value in the current request resource range, and the request does not contain the if range request header field
    417 -- the server does not meet the expected value specified in the expect header field of the request. If it is a proxy server, the next level server may not meet the request
5). 5xx: server side error -- the server failed to implement the legal request
    500 - internal error from server
    501 -- the server does not support the requested function
    502 - the server is temporarily unavailable, sometimes to prevent system overload
    503 - server overloaded or out of service
    504 - the gateway is overloaded, the server uses another gateway or service to respond to the user, and the waiting time setting value is long
    505 - the server does not support or reject the HTTP version specified in the request header