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

What are the knowledge points of HTTP protocol

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the relevant knowledge of the knowledge points of the HTTP protocol, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading the knowledge points of this HTTP agreement. Let's take a look at it.

HTTP is also called Hypertext transfer Protocol, and its full name is Hyper Transfer Protocol. At first, HTTP can only transfer HTML files, but slowly now you can transfer text, images, videos, and various streaming files.

HTTP is stateless: the same client initiates multiple requests in succession, all new requests to the HTTP server, and HTTP has no way to know it comes from one client.

HTTP message structure: to see the specific message structure, you need to use the package grabbing tool, so here is only a brief introduction, there are no specific examples. The message structure of Request and response is basically the same.

Header: divided into request/response line and request/response header.

Request/response line: includes the requested method Method (GET/POST), the path to the requested resource path to resource, and the version number of the http protocol.

Request/response header: here are all kinds of request headers.

Body: response body, usually a HTML file. If it is a get request, there is no response body.

HTTP request method:

GET requests to get the resource identified by Request-URI

POST appends new data to the resource identified by Request-URI

HEAD request to get the response message header of the resource identified by Request-URI

PUT requests the server to store a resource and use Request-URI as its identity

DELETE requests the server to delete the resource identified by Request-URI

TRACE requests the server to send back the received request information, mainly for testing or diagnosis

CONNECT is reserved for future use

OPTIONS requests to query server performance, or query resource-related options and requirements

For us, the common ones are GET, and POST. Again, without form submission, get does not have a security problem compared with post.

HTTP status code:

1XX prompt message-indicates that the request has been successfully received and continues processing.

2XX successful-indicates that the request has been successfully received, understood, and accepted

3XX redirection-further processing is required to complete the request

4XX client error-request has syntax error or request cannot be implemented

5XX server-side error-the server failed to fulfill a legitimate request

There are a lot of status codes, which can be understood by yourself. I think there are a few that we must know.

HTTP communication process: query DNS according to URL, find server, establish TCP connection, send request, server response.

For HTTP, I think it is basic to know that HTTP is stateless, the message structure of HTTP, the basic request method, and the basic status code.

There is still a lot to learn about the HTTP protocol, which is only a basic need to know.

Welcome to follow the official account of Coding personal notes

Front-end engineers deal with browsers most often, no matter what they do without browsers, in which HTTP protocol is often ignored, but in fact, resource caching, CDN loading, page performance optimization and so on are inseparable from the understanding of HTTP protocol.

HTTP is also called Hypertext transfer Protocol, and its full name is Hyper Transfer Protocol. At first, HTTP can only transfer HTML files, but slowly now you can transfer text, images, videos, and various streaming files.

HTTP is stateless: the same client initiates multiple requests in succession, all new requests to the HTTP server, and HTTP has no way to know it comes from one client.

HTTP message structure: to see the specific message structure, you need to use the package grabbing tool, so here is only a brief introduction, there are no specific examples. The message structure of Request and response is basically the same.

Header: divided into request/response line and request/response header.

Request/response line: includes the requested method Method (GET/POST), the path to the requested resource path to resource, and the version number of the http protocol.

Request/response header: here are all kinds of request headers.

Body: response body, usually a HTML file. If it is a get request, there is no response body.

HTTP request method:

GET requests to get the resource identified by Request-URI

POST appends new data to the resource identified by Request-URI

HEAD request to get the response message header of the resource identified by Request-URI

PUT requests the server to store a resource and use Request-URI as its identity

DELETE requests the server to delete the resource identified by Request-URI

TRACE requests the server to send back the received request information, mainly for testing or diagnosis

CONNECT is reserved for future use

OPTIONS requests to query server performance, or query resource-related options and requirements

For us, the common ones are GET, and POST. Again, without form submission, get does not have a security problem compared with post.

HTTP status code:

1XX prompt message-indicates that the request has been successfully received and continues processing.

2XX successful-indicates that the request has been successfully received, understood, and accepted

3XX redirection-further processing is required to complete the request

4XX client error-request has syntax error or request cannot be implemented

5XX server-side error-the server failed to fulfill a legitimate request

There are a lot of status codes, which can be understood by yourself. I think there are a few that we must know.

HTTP communication process: query DNS according to URL, find server, establish TCP connection, send request, server response.

This is the end of the article on "what are the knowledge points of HTTP protocol". Thank you for reading! I believe you all have a certain understanding of "what are the knowledge points of the HTTP protocol". If you want to learn more, you are welcome to follow 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

Development

Wechat

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

12
Report