向 / 从一个服务器传输数据。 支持大多数协议,包括 HTTP, FTP, 和 POP3. 更多信息:https://curl.se/docs/manpage.html.
curl {{http://example.com}} {{[-o|--output]}} {{文件名}}
curl {{[-O|--remote-name]}} {{http://example.com/filename}}
curl {{[-f|--fail]}} {{[-O|--remote-name]}} {{[-L|--location]}} {{[-C|--continue-at]}} - {{http://example.com/filename}}
application/x-www-form-urlencoded
的 POST 请求):curl {{[-d|--data]}} {{'name=bob'}} {{http://example.com/form}}
curl {{[-H|--header]}} {{'X-My-Header: 123'}} {{[-X|--request]}} {{PUT}} {{http://example.com}}
Content-Type
请求头:curl {{[-d|--data]}} {{'{"name":"bob"}'}} {{[-H|--header]}} {{'Content-Type: application/json'}} {{http://example.com/users/1234}}
curl {{[-u|--user]}} {{用户名}} {{http://example.com}}
curl {{[-E|--cert]}} {{client.pem}} --key {{key.pem}} {{[-k|--insecure]}} {{https://example.com}}