概述
GET方法
示例:
curl -X GET http://192.168.10.8:9200
POST方法
示例:
curl -X POST \
http://127.0.0.1:5016/app/data/progress \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"token":"xxxxx",
"type":0,
"months": ["202108"]
}'
-S、-L、-k、-o
-S:–show-error Show error. With -s, make curl show errors when they occur
-L:–location Follow redirects (H),指定下载文件的地址
-k:–insecure Allow connections to SSL sites without certs (H),不对证书进行校验。
-o:–output FILE Write output to instead of stdout,指定文件存储名称。
示例:
curl -SL -k https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/100184.html