HTTP request Response Process

Source: Internet
Author: User

1) Establish connection: client and server establish TCP connection

2) Send request: After a connection is opened, the client sends the request information to the appropriate port on the server and completes the request action submission.

3) Send response: The server sends a response message to the client after the client request has been processed.

4) Close the connection: both the client and server side can close the socket to end the TCP/IP conversation.

HTTP works by requesting and responding to messages. The simplest scenario is when a user enters a site address and sends a request. After that, the browser returns the requested page, which may be the simplest HTML page or a dynamically compiled page. If the page is wrong or does not exist, the Web server will send an incorrect information page.

The Web server sends an error Message page because HTTP does not have a built-in processing mechanism, is stateless, and the transport protocol does not remember any information from one request message to another request message (note: This means that when sending a request message An error occurs because HTTP is stateless, Therefore, this error message cannot be passed to another request message for processing, and the request message cannot be turned and must be uploaded and processed at one time to ensure consistency of the web. However, users often need to remember some of the settings or browsing process, which requires a Web page or URL to carry a variety of parameters and values. HTTP requests have multiple styles. There are get,post,head requests that are commonly used.

HTTP request Response Process

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.