CURL执行请求

curl -X POST --header 'Connection: keep-alive' --header 'Content-Type: application/json;charset=UTF-8' -d '{"name":"lily"}' 'http://localhost:8080/test'

--header指定头部设置

-d 指定body体

-X 指定请求方法,默认为GET

原文地址:https://www.cnblogs.com/liwutao/p/12768863.html