How do you upload a image file and a json with curl?
I'm trying to use command line curl to test an API. The call takes in some parameters and a image file. Is there a way for me to specify the parameters using a json file, and make开发者_高级运维 the request via curl so both the image file and the json file gets uploaded to the server?
Check the curl documentation here
In the POST (HTTP) part you'll find the answer to your question.
You need to use the -F parameter
精彩评论