curl -h来查看请求参数的含义
-v 显示请求的信息
-X 选项指定其它协议
get:
curl -v 192.168.33.1:8080/girls/age/18
post:
curl -v 192.168.33.1:8080/girls -d 'age=14&cupSize=C'
curl -v -X POST 192.168.33.1:8080/girls -d 'age=14&cupSize=C'
put:
curl -v -X PUT -d "age=19&cupSize=C" 192.168.33.1:8080/girls/3
delete:
curl -v -X DELETE 192.168.33.1:8080/girls/3
-H ‘xxx’ 带请求头
curl -v -H 'ApiKey:xxx' -H 'Sign:xxx' -H 'RequestTime:xxx' -H 'Content-Type:application/json' -H 'User-Agent:PostmanRuntime/7.26.10' -H 'Accept:*/*' -H 'Accept-Encoding:gzip, deflate, br' -H 'Connection:keep-alive' -X POST 192.xxx.xx.xx:xxxx/test/xxxx -d '{"orgCode":"xxx","districtId":"1"}'