curl -d 等于curl -data, 默认就是POST,可以不指定-X
传多个参数要使用多个--data-urlencode。
curl --data-urlencode aa@gc.log --data-urlencode bb=123 ‘localhost:8088/aax‘
参数aa 等于 gc.log中的文件内容经过urlEncode之后的数据, 注意使用的是@
参数bb使用的=
将参数内容直接写在文件中
curl --data-urlencode @xxx.file ‘localhost:8088/aax‘
上传文件内容
curl -d @xxx.file
curl
原文地址:https://www.cnblogs.com/yszzu/p/9600007.html