Linux常用手记

Top

Curl

1、curl工具不带有任何参数时,curl 默认发出 GET 请求。

curl https://www.baidu.com

curl工具发送带有参数的GET请求

curl URL?a=1&b=nihao

2、curl工具发送POST请求

curl -X POST -d 'a=1&b=nihao' URL

curl工具发送json格式请求

curl -H "Content-Type: application/json" -X POST -d '{"abc":123,"bcd":"nihao"}' URL

可参考:https://www.cnblogs.com/hls-code/p/16877803.html

你可能感兴趣的:(linux,java,前端)