美文网首页
命令行curl模拟get post请求

命令行curl模拟get post请求

作者: 辣瓜瓜 | 来源:发表于2019-04-10 23:30 被阅读0次

新学到一个小技巧,在命令行中模拟get、post请求

模拟post请求

模拟post请求,在命令行中输入:-d代表post请求

curl -d '[参数]' [请求地址]
eg: curl -d 'name=bob&age=27' http://localhost:30000/users/add
模拟get请求
curl [请求地址?参数=参数值&参数=参数值...]
eg: curl http://localhost:30000/users/add

相关文章

网友评论

      本文标题:命令行curl模拟get post请求

      本文链接:https://www.haomeiwen.com/subject/yjxiiqtx.html