How to cURL post with JSON parameters?
This question already has an answer here:
The curl error is due to braces {} and square brackets [] being special curl globbing characters. Use the -g option to turn off globbing and you should be fine.
Same issue as this post: How to PUT a json object with an array using curl
There two ways to approach this.
For example:
curl -X POST -H "Content-Type: application/json"
--data '{"field1":"something","whatever":10,"description":"body","id":"random","__oh__":{"session":"12345678jhgfdrtyui"}}'
https://example.com/action
链接地址: http://www.djcxy.com/p/8542.html
上一篇: 请求通过卷曲瓶
下一篇: 如何使用JSON参数张贴文章?