HTTP protocol request and response

Process: The browser sends a request, the server receives the request, the server response result, the browser display results. Wherein the browser and the server sends the response conforms to the HTTP protocol
HTTP protocol: HyperText Transfer Protocol
is mainly used to standardize the data exchange format of the browser and the service
features: simple and fast, connectionless, stateless, flexible version 1.1 to support sustainable Connectivity access
HTTP request format:
request header: mode request, a request address, protocol version HTTP
request line: message header, generally used to illustrate some of the additional information to be used by the client. For example, tell the server language support, in what way and so returned
empty rows: Located between data request and the request line, the blank line is necessary
to request data: non-essential
HTTP request methods:
HTTP1.0 defines three get, post, head
the HTTP1.1 request additional five ways: Options, PUT, Delete, the trace, Connect
get: information specifying the requested page and return the entity body
head: similar to the get request is returned in response, but no specific class content
post: Submit data processing request to the designated resource is included in the data requesting entity in the post request may cause the existing resources to establish or modify a new resource
put: substituted designated document data transmitted to the customer terminal from the server class content
delete: page request to the server to delete the specified
connect: HTTP / 1.1 protocol reserved for change proxy server can connect pipelines way of
options: allow the end customer to view the performance of the server
trace: back to the requesting server receives considerably, mainly used for testing or diagnosis
Get and Post request distinction request:
GET request method: request data will be? Splice forms in the request header, insecurity, no part of the requesting entity.
Although HTTP request does not specify the size of data, but the browser's URL address length is limited, so get request can not carry large amounts of data
post request method: request data sent in the request entity, seen in less than a specific URL request data, safe and suitable for mass data transmission
HTTP response format:
the response line (status line): HTTP version, status code, status message
response headers: message header extensions customer end use
blank line: response headers and responding entity must be between the
response entity: the body, the server returns the information to the browser

Guess you like

Origin www.cnblogs.com/cqzy/p/11332371.html