
curl \u4e00\u76f4\u662f\u4e00\u4e2a\u5f88\u68d2\u7684\u6d4b\u8bd5 HTTP \u7f51\u7edc\u7684\u5de5\u5177\u3002\u751a\u81f3\u6709\u4e9b\u5206\u524d\u540e\u7aef\u7684\u516c\u53f8\u91cc\uff0c\u524d\u540e\u7aef\u5bf9\u63a5\u5199\u6587\u6863\u6765\u63cf\u8ff0 HTTP \u63a5\u53e3\u65f6\uff0c\u56e0\u4e3a\u5927\u5bb6\u8ba4\u77e5\u7684\u5dee\u5f02\u5e38\u4f1a\u5bfc\u81f4\u53cd\u590d\u6c9f\u901a\u626f\u76ae\uff0c\u563f\uff0c\u4e0d\u5982\u76f4\u63a5\u5199\u4e00\u884c curl \u547d\u4ee4\uff0c\u76f4\u63a5\u7c98\u8d34\u5230\u547d\u4ee4\u884c\u56de\u8f66\u5c31\u53ef\u4ee5\u77e5\u9053\u63a5\u53e3\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\uff0c\u518d\u8bf4\u63a5\u53e3\u4e0d\u901a\u5c31\u8bf4\u4e0d\u8fc7\u53bb\u4e86\u3002\u53ef\u89c1\u5176\u8fd1\u4e4e\u4e00\u4e2a\u53c2\u8003\u5b9e\u73b0\u3002
\n\u800c\u4eca\uff0ccurl \u6700\u65b0\u7248\u5bf9 HTTP3 \u7684\u652f\u6301\u5df2\u7ecf\u4e0d\u518d\u662f\u5b9e\u9a8c\u6027\u8d28\u7684\u3002\u4f46\u622a\u6b62\u76ee\u524d\u4f17\u591a\u5305\u7ba1\u7406\u5668\u4ecd\u65e0\u6cd5\u4e0b\u8f7d\u5230\u65b0\u7248\u3002\u5f53\u7136\uff0c\u4f60\u6709 nami\u3002
\n\u4f60\u53ef\u4ee5\u5728 Linux, macOS, Windows \u4e0a\u7528 nami \u6765\u5b89\u88c5 curl
\nnami install curl\n\ncurl --http3-only https://http3.ooo -v\n\ncurl \u4f3c\u4e4e\u4e0d\u652f\u6301\u53c2\u6570\uff1a --max-filesize\nwget \u4e5f\u4e0d\u884c\u3002\n\u6709\u5176\u4ed6\u4ec0\u4e48\u547d\u4ee4\u884c\u4e0b\u8f7d\u5de5\u5177 \u80fd\u8df3\u8fc7\u5c0f\u4e8e\u6307\u5b9a\u5927\u5c0f\u7684\u6587\u4ef6\u5417\uff1f
\n" }, { "author": { "url": "member/liuxing", "name": "liuxing", "avatar": "https://cdn.v2ex.com/gravatar/91f42e226676a7ce8f53ef5dcd6a3f8e?s=73&d=retro" }, "url": "t/774907", "date_modified": "2021-05-04T14:19:58+00:00", "content_html": "Curl \u662f\u4e00\u4e2a\u5e38\u7528\u7684\u547d\u4ee4\u884c\u6570\u636e\u4f20\u8f93\u5de5\u5177\uff0c\u53ef\u4ee5\u65b9\u4fbf\u7684\u4ece\u547d\u4ee4\u884c\u521b\u5efa\u7f51\u7edc\u8bf7\u6c42\u3002\u5b83\u652f\u6301\u4f17\u591a\u534f\u8bae\uff0c\u652f\u6301\u5982 HTTP, HTTPS, FTP, FTPS, SFTP, IMAP, SMTP, POP3 \u7b49\u7b49\u534f\u8bae\u3002Curl \u63d0\u4f9b\u4e86\u5f88\u591a\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u5b83\u6765\u8fdb\u884c HTTP \u8bf7\u6c42\u3001\u4e0a\u4f20 /\u4e0b\u8f7d\u6587\u4ef6\u7b49\uff0c\u4e14\u652f\u6301 Cookie \u3001\u7528\u6237\u5bc6\u7801\u9a8c\u8bc1\u3001\u4ee3\u7406\u96a7\u9053\u3001\u9650\u901f\u7b49\u3002
\n\u6587\u7ae0\u94fe\u63a5\uff1ahttps://www.liuxing.io/blog/curl/
\n", "date_published": "2021-05-04T13:48:38+00:00", "title": "\u8bb0\u5f55\u4e0b Curl \u4f7f\u7528\u6307\u5357", "id": "t/774907" }, { "author": { "url": "member/98546116", "name": "98546116", "avatar": "https://cdn.v2ex.com/gravatar/c1cf10c88f7b81936598913b4cea8f0c?s=73&d=retro" }, "url": "t/774479", "date_modified": "2021-05-01T03:15:29+00:00", "content_html": "\u7535\u4fe1\u5149\u732b\uff0ccurl \u8bbf\u95ee https \u65f6\u63d0\u793a\u8bc1\u4e66\u9519\u8befcurl 8000 \u4f1a\u8f6c\u6362\u4e3a curl 0.0.31.64 \uff0c\u540e\u9762\u7684 IP \u5c31\u662f\u628a 8000 \u8f6c\u4e3a\u4e8c\u8fdb\u5236\u9ad8\u4f4d\u8865 0\uff0c\u7136\u540e\u518d\u4ece\u9ad8\u4f4d\u5230\u4f4e\u4f4d 8 \u4e2a\u6570\u5b57\u4e00\u5207\u5272\u8f6c\u4e3a\u5341\u8fdb\u5236\u3002\u4e0d\u592a\u660e\u767d curl \u4e3a\u5565\u8fd9\u4e48\u8bbe\u8ba1\uff1f
\n", "date_published": "2021-04-16T11:07:17+00:00", "title": "cURL \u4e3a\u4ec0\u4e48\u4f1a\u628a\u5341\u8fdb\u5236\u6570\u5b57\u8f6c\u4e3a IP\uff1f", "id": "t/771159" }, { "author": { "url": "member/wework", "name": "wework", "avatar": "https://cdn.v2ex.com/gravatar/e00c9d7936bc7326f91ed6f027a31e79?s=73&d=retro" }, "url": "t/763568", "date_modified": "2021-03-21T00:21:00+00:00", "content_html": "Curl \u4f5c\u8005\u53d1\u6587\u5e86\u795d curl \u5de5\u5177\u8bde\u751f 23 \u5468\u5e74
\nCurl \u9996\u6b21\u53d1\u5e03\u4e8e March 20, 1998.
\nhttps://daniel.haxx.se/blog/2021/03/20/curl-is-23-years-old-today/
\n", "date_published": "2021-03-20T23:51:51+00:00", "title": "Curl \u5de5\u5177 23 \u5c81\u751f\u65e5", "id": "t/763568" }, { "author": { "url": "member/bbxiong", "name": "bbxiong", "avatar": "https://cdn.v2ex.com/gravatar/9bc5e10e6df3a4deab35355e5d70fde5?s=73&d=retro" }, "url": "t/709500", "title": "\u8bf7\u6559\u5982\u4f55\u7528 curl \u4e0b\u8f7d\u9a8c\u8bc1\u7801\u56fe\u7247", "id": "t/709500", "date_published": "2020-09-22T09:32:34+00:00", "content_html": "\u9a8c\u8bc1\u7801\u94fe\u63a5\u5982\u4e0b
\n\n\u8bf7\u95ee\u5982\u4f55\u7528 curl \u4e0b\u8f7d \u8fd9\u4e2a\u94fe\u63a5\u91cc\u7684\u9a8c\u8bc1\u7801\u56fe\u7247
\n2 \u4e2a\u56fe\u7247,\u4e00\u4e2a\u662f\u5e26\u7f3a\u53e3\u7684\u7528\u4e8e\u8bc6\u522b\u7684\u56fe\u7247\n\u4e00\u4e2a\u662f\u6ed1\u52a8\u6a21\u5757
\n" }, { "author": { "url": "member/Livid", "name": "Livid", "avatar": "https://cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1776395740" }, "url": "t/653786", "title": "curl \u5c06\u5728\u7248\u672c 7.70 \u652f\u6301\u4ee5 JSON \u65b9\u5f0f\u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f", "id": "t/653786", "date_published": "2020-03-18T02:45:21+00:00", "content_html": "https://daniel.haxx.se/blog/2020/03/17/curl-write-out-json/
\n\u4f8b\u5b50\u5982\u4e0b\uff1a
\n{\n \"url_effective\": \"https://example.com/\",\n \"http_code\": 200,\n \"response_code\": 200,\n \"http_connect\": 0,\n \"time_total\": 0.44054,\n \"time_namelookup\": 0.001067,\n \"time_connect\": 0.11162,\n \"time_appconnect\": 0.336415,\n \"time_pretransfer\": 0.336568,\n \"time_starttransfer\": 0.440361,\n \"size_header\": 347,\n \"size_request\": 77,\n \"size_download\": 1256,\n \"size_upload\": 0,\n \"speed_download\": 0.002854,\n \"speed_upload\": 0,\n \"content_type\": \"text/html; charset=UTF-8\",\n \"num_connects\": 1,\n \"time_redirect\": 0,\n \"num_redirects\": 0,\n \"ssl_verify_result\": 0,\n \"proxy_ssl_verify_result\": 0,\n \"filename_effective\": \"saved\",\n \"remote_ip\": \"93.184.216.34\",\n \"remote_port\": 443,\n \"local_ip\": \"192.168.0.1\",\n \"local_port\": 44832,\n \"http_version\": \"2\",\n \"scheme\": \"HTTPS\",\n \"curl_version\": \"libcurl/7.69.2 GnuTLS/3.6.12 zlib/1.2.11 brotli/1.0.7 c-ares/1.15.0 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) nghttp2/1.40.0 librtmp/2.3\"\n}\n\n\u5982\u679c\u6240\u6709 Unix \u5de5\u5177\u90fd\u80fd\u8fd9\u6837\u7528 JSON \u683c\u5f0f\u8f93\u51fa\u4fe1\u606f\u5c31\u597d\u4e86\u3002
\n" }, { "author": { "url": "member/gainsurier", "name": "gainsurier", "avatar": "https://cdn.v2ex.com/avatar/7f9d/d067/156062_large.png?m=1639980903" }, "url": "t/523705", "title": "libcurl \u83b7\u5f97\u6570\u636e\u7684\u65f6\u5019\uff0c\u6709 recv \u6216\u8005 pull \u8fd9\u6837\u4e3b\u52a8\u62c9\u53d6\u6570\u636e\u7684\u63a5\u53e3\uff0c\u800c\u4e0d\u662f\u4f7f\u7528\u56de\u8c03\u51fd\u6570\u88ab\u52a8\u63a5\u6536\u6570\u636e\u7684\u65b9\u5f0f\u5417\uff1f", "id": "t/523705", "date_published": "2019-01-04T01:16:19+00:00", "content_html": "" }, { "author": { "url": "member/Livid", "name": "Livid", "avatar": "https://cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1776395740" }, "url": "t/304360", "title": "curl \u4f5c\u8005\u5173\u4e8e\u4ed6\u548c HTTP \u7684\u6545\u4e8b", "id": "t/304360", "date_published": "2016-09-06T09:50:27+00:00", "content_html": "https://daniel.haxx.se/blog/2016/09/06/my-first-20-years-of-http/" }, { "author": { "url": "member/Livid", "name": "Livid", "avatar": "https://cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1776395740" }, "url": "t/260890", "title": "cURL \u548c Wget \u7684\u5f02\u540c\u6bd4\u8f83", "id": "t/260890", "date_published": "2016-03-03T10:45:23+00:00", "content_html": "https://daniel.haxx.se/docs/curl-vs-wget.html" }, { "author": { "url": "member/Livid", "name": "Livid", "avatar": "https://cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1776395740" }, "url": "t/179148", "title": "\u8f93\u51fa curl \u8bf7\u6c42\u5404\u4e2a\u9636\u6bb5\u7684\u65f6\u95f4", "id": "t/179148", "date_published": "2015-03-24T14:54:14+00:00", "content_html": "https://josephscott.org/archives/2011/10/timing-details-with-curl/" }, { "author": { "url": "member/zeroday", "name": "zeroday", "avatar": "https://cdn.v2ex.com/avatar/f8f7/aa63/46033_large.png?m=1397284406" }, "url": "t/108198", "date_modified": "2014-04-11T14:25:18+00:00", "content_html": "bash\u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898\uff1a-bash: __git_ps1: command not found