This chapter gives you some questions that may be asked in the interview about the HTTP protocol class, there is a certain reference value, the need for friends can refer to, I hope to help you.
1. What are the main features of the HTTP protocol class?
Simple and fast: refers to each resource character, UII, is fixed, Uniform resource character,
Flexible: The head has a data type, the transmission of different data types can be done via an HTTP protocol
No connection: The connection is cut off once
Stateless: The client and the server are two identities and cannot distinguish between two-time connector identities
2. What are the components of the message?
Request message:
Request line contains: HTTP method, page address, HTTP protocol, version
Request Header: Key&value value to tell the server what I want
Blank Line
Request Body
Response message:
Status line, response header, blank line, response body
3. What are the methods in the HTTP protocol class?
Get---get resources
POST---transfer resources
PUT---Update resources
Delete---Remove resources
HEAD---Get message header
4. The difference between post and get
5. What are the HTTP status codes?
1XX: Prompt-Indicates that the request has been received and continues processing
2XX: Success-Indicates that the request has been successfully received
3XX: Redirect--further action is required to complete the request
4XX: Client Error--Request syntax error or request not implemented
5XX: Server error-Server failed to implement legitimate request
OK: Client Request succeeded
206 PARTIAL CONTENT: The client sends a GET request with a range header, the server finishes it, range is the meaning of the scope
301 Moved Permanently: The requested page has been moved to a new URL (permanent redirect)
302 FOUND: The requested page has been temporarily moved to a new URL (temporary redirect)
304 NO MODIFIED: The client has a buffered document issued a conditional request, the server tells the customer that the original buffered document can also continue to use (cache)
6. What is persistent link
1.1 Version Support Persistent link, 1.0 no
7, what is the pipeline of
Pipelining must be through a persistent connection and must be supported over HTTP version 1.1
Only get and head requests can be pipe-fitting, post is limited
Initial connection creation should not start the pipeline mechanism because the server does not necessarily support the http1.1 version protocol