zoukankan      html  css  js  c++  java
  • centos下 telnet访问百度

    先在命令行输入以下命令:

    telnet www.baidu.com 80

    点击确认之后出现如下界面

    然后接着输入以下两行命令

    GET /index.html HTTP/1.1
    Host: www.baidu.com

    到了这里 接着连续按两下 enter键 就会返回百度首页的内容 如下:

    HTTP/1.1 200 OK
    Date: Sun, 17 Sep 2017 09:31:07 GMT
    Content-Type: text/html
    Content-Length: 14613
    Last-Modified: Thu, 14 Sep 2017 03:04:00 GMT
    Connection: Keep-Alive
    Vary: Accept-Encoding
    Set-Cookie: BAIDUID=B0BE15AB9B826700DABA32CFEA847004:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    Set-Cookie: BIDUPSID=B0BE15AB9B826700DABA32CFEA847004; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    Set-Cookie: PSTM=1505640667; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    P3P: CP=" OTI DSP COR IVA OUR IND COM "
    Server: BWS/1.1
    X-UA-Compatible: IE=Edge,chrome=1
    Pragma: no-cache
    Cache-control: no-cache
    Accept-Ranges: bytes
    
    <!DOCTYPE html><!--STATUS OK-->
    <html>
    ....
    </html>

  • 相关阅读:
    作业5,6 2019/10/23
    作业1、2、3、4 2019/10/23
    实现Map传参Mybatis
    maven工程配置pom.xml实现mybatis的访问数据库操作
    测试
    Postman篇之命令行测试
    unittest框架
    测试
    测试
    测试
  • 原文地址:https://www.cnblogs.com/tangkaishou/p/9416750.html
Copyright © 2011-2022 走看看