命令行curl模拟get post请求
2019-04-10 本文已影响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