命令提示符下执行telnet,提示:’telnet’ 不是内部或外部命令,也不是可运行的程序或批处理文件。Win7,Win10系统环境下,Telnet客户端默认是关闭状态。
打开【控制面板】。单击“程序”;单击“打开或关闭Windows功能”;勾选“Telnet客户端”,单击“确定”
关闭Telnet客户端,要重启以后才会生效;
- telnet连接
telnet 192.168.56.101 8082
- telnet 发送Http请求
telnet 登录上述服务端口,输入: GET /hello/ HTTP/1.0 Host: 192.168.56.101:8082 然后加回车: root@robert-Ubuntu:/tmp# telnet 192.168.56.101 8082 Trying 192.168.56.101… Connected to 192.168.56.101. Escape character is ‘^]’. GET /hello/ HTTP/1.0 Host: 192.168.56.101:8082 HTTP/1.0 200 OK Date: Thu, 13 Aug 2020 10:56:47 GMT Server: WSGIServer/0.1 Python/2.7.12 Vary: Cookie X-Frame-Options: SAMEORIGIN Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Title</title> </head> <body> Hello ===AnonymousUser === ! <p>The path info of http request is /hello/</p> </body> </html>