curl post 请求命令记录

总记不住格式,在此记录一下

1.普通post请求
 

curl  https://127.0.0.1:8080/hello/param -X POST -d "name=123214214&age=&sex=1&address=beijing"

2.json请求
 

curl -X POST -H "Content-Type: application/json" -H "Content-Type:application/json" http://127.0.0.1:8080/hello/json -d '{"name":"张三","age":"11","sex":"1"}'

你可能感兴趣的:(java)