美文网首页程序员
怎么使用curl模拟http请求

怎么使用curl模拟http请求

作者: 禹子歆 | 来源:发表于2018-07-19 15:06 被阅读14次

get方式请求:

curl 地址:端口/路由

e.g:

curl 127.0.0.1:3000/test_sql

post方式请求:

curl -X POST -d "参数名=实参&参数名=实参" 地址:端口/路由

e.g:

curl -X POST -d "username=xianwx&password=test" 127.0.0.1:3000/auth

相关文章

网友评论

    本文标题:怎么使用curl模拟http请求

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