Questions about the HTTP protocol class that may be asked during an interview (summary)

Source: Internet
Author: User
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

Related Article

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.