标题:curl -XGET http://baidu.com和 curl -XPOST http://baidu.com的Tcp流区别。 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Sat, 24 Jun 2017 12:35:14 +0000 作者:jackxiang 地址:http://jackxiang.com/post/9250/ 内容: 内容: curl -XGET http://baidu.com GET / HTTP/1.1 User-Agent: curl/7.29.0 Host: baidu.com Accept: */* HTTP/1.1 200 OK Date: Fri, 31 Mar 2017 03:56:42 GMT Server: Apache Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT ETag: '51-47cf7e6ee8400' Accept-Ranges: bytes Content-Length: 81 Cache-Control: max-age=86400 Expires: Sat, 01 Apr 2017 03:56:42 GMT Connection: Keep-Alive Content-Type: text/html curl -XPOST http://baidu.com POST / HTTP/1.1 User-Agent: curl/7.29.0 Host: baidu.com Accept: */* HTTP/1.1 200 OK Date: Fri, 31 Mar 2017 03:59:50 GMT Server: Apache Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT ETag: '51-47cf7e6ee8400' Accept-Ranges: bytes Content-Length: 81 Cache-Control: max-age=86400 Expires: Sat, 01 Apr 2017 03:59:50 GMT Connection: Keep-Alive Content-Type: text/html Post加个参数: curl -XPOST http://baidu.com -d'say=hello' POST / HTTP/1.1 User-Agent: curl/7.29.0 Host: baidu.com Accept: */* Content-Length: 9 Content-Type: application/x-www-form-urlencoded say=helloHTTP/1.1 200 OK Date: Fri, 31 Mar 2017 04:03:47 GMT Server: Apache Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT ETag: '51-47cf7e6ee8400' Accept-Ranges: bytes Content-Length: 81 Cache-Control: max-age=86400 Expires: Sat, 01 Apr 2017 04:03:47 GMT Connection: Keep-Alive Content-Type: text/html Get里加个参数: curl -XGET http://baidu.com?say=hello GET /?say=hello HTTP/1.1 User-Agent: curl/7.29.0 Host: baidu.com Accept: */* HTTP/1.1 200 OK Date: Fri, 31 Mar 2017 04:05:06 GMT Server: Apache Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT ETag: '51-47cf7e6ee8400' Accept-Ranges: bytes Content-Length: 81 Cache-Control: max-age=86400 Expires: Sat, 01 Apr 2017 04:05:06 GMT Connection: Keep-Alive Content-Type: text/html Generated by Jackxiang's Bo-blog 2.1.1 Release