Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Http Protocol

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you Http protocol sample analysis, I believe most people do not know how, so share this article for your reference, I hope you read this article after a great harvest, let us go to understand it!

HTTP Protocol:

Hypertext Transfer Protocol, which is a distributed, collaborative, stateless, application-oriented, TCP-based information system;

In the 1.0 era, the service shut down after the request was sent

In the 1.1 era, by setting keepalive (whether there is a link for a period of time)--> server side active shutdown

Although upgraded in 2.0, it still can't keep a long connection, strictly speaking it's still a short connection

Http protocol itself is concerned about the connection, request, response, resources, and the form of realization, etc., each time the transmission does not care about the data itself, each time to carry the request body, response body, and for the data transmission itself is not the focus, many times we deal with the request transmission of really empty data, such transmission is very wasteful performance and meaningless;

Http URL

In Http, URLs (Uniform Resource Locators) are used to locate network resources.

HttpURI

URI(Uniform Resource Identifier)

connected

Persistent connection: 1.1 realizes multiple requests to the same server in a short time. Advantages: By establishing and closing fewer TCP connections, not only the CPU time between the router and the host is saved, but also the memory used by the host for TCP protocol control blocks is saved. Network congestion will be reduced, and persistent connections provide a mechanism that can unilaterally terminate the protocol.

status code

100: The client should continue sending requests. This temporary response is used to notify the client that part of its request has been received by the server and has not yet been rejected. The client should continue sending the remainder of the request or ignore this 100 response if the request has already been completed. The server must send a final response to the client after the request is complete;

101: Switch protocol. Protocols should switch only if they benefit from switching;

2xx: Success.

201: Created.

202: Accepted.

204: Nothing.

3xx : Redirect.

4xx: Client error.

5xx: server-side error. Generally, there is an error in the background logic code.

Above is "Http protocol sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report