码迷,mamicode.com
首页 > Web开发 > 详细

curl

时间:2020-02-24 13:29:22      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:ica   curl   hang   json   type   post   md5   url   zha   

1. curl post json
request:curl http://127.0.0.1:9098/hello -X POST -H ‘Content-Type: application/json‘ -d ‘{
    "username": "zhang_san",
    "password": "md5(zhang_san)"
}‘
response:{"code":200,"msg":"success"}

2. curl post json and get response of http_code
request:curl http://127.0.0.1:9098/hello -X POST -H ‘Content-Type: application/json‘ -d ‘{
"username": "zhang_san",
"password": "md5(zhang_san)"
}‘ -w ‘ [http_code: %{http_code}]‘
response:{"code":200,"msg":"success"} [http_code: 200]

curl

标签:ica   curl   hang   json   type   post   md5   url   zha   

原文地址:https://www.cnblogs.com/hezhixiong/p/12356321.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!