curl命令get/post请求

GET请求:
 
curl -X GET --header 'Accept: application/json' 'http://ip:8080/api/book/detail?bookId=5&bookName=newBeer' 

POST请求:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"bookId":"5","bookName":"newBeer"}' 'http://ip:8080/api/book/update'

 

posted on 2021-01-27 16:04  IT-风  阅读(3529)  评论(0编辑  收藏  举报

导航