1、get请求
格式:
curl protocol://address:port/url?args
例子:
curl http://xxxx/check_your_statususer=Summer&passwd=12345678
2、post请求
格式:
curl -d “args” “protocol://address:port/url”
例子:
curl -d “user_id=1000&device_id=1” “http://xxx” (接口地址)
3、json格式的post请求
curl -l -H "Content-type: application/json" -X POST -d '{"phone":"13521389587","password":"test"}' http://domain/apis/users.json