curl -H 'Accept: application/json' -H 'Content-Type: application/json;charset=utf-8' -i 'https://ip:port/xxxx' -d '{
"account":"zhangsan",
"password":"123456",
"msgid":"s5few5ffa6sdf6554f6w",
"phones":"13800138000",
"content":"您的验证码为:666666",
"sign":"【xxx】",
"subcode":"",
"sendtime":""
}'

命令:curl -X [-H “xxx:xxx”]… [-d “xxx=xxx”]… url

-X :请求方式 Get,Post,Put,Delete 。。。
-H :header的值
-d :post/put/delete 请求所带的form表单或body ;get请求无视这个参数
-i/–include:输出时包括protocol头信息
url :请求地址

打赏
支付宝 微信
上一篇 下一篇