- To send an HTTP request using Telnet
Writing this blog, in fact, there is not much practical significance, but it is very necessary, if the use of a good telnet command, you can well understand some of the concepts of HTTP, especially the persistent link http1.1.
To use the Telnet command, you must first open the Telnet client and server, add it in the Control Panel, and then use services.msc to check if it is installed.
For example: Telnet localhost 8080, and then you can see the corresponding return.
If we use http1.1, we are continuing to link, that is, we can continuously send requests on the same link.
Head/huhu.html http/1.1host:www.baidu.com
If we use the http1.0, the link is broken directly after the response is returned.
Head/huhu.html http/1.0host:www.baidu.com
Of course we use http/1.1, we can also set the connection state, for example:
Head/http/1.1host:www.baidu.comconnection:keep-alive
Head/http/1.1host:www.baidu.comconnection:close
To send an HTTP request using Telnet