开发者

How do you upload a image file and a json with curl?

开发者 https://www.devze.com 2023-01-29 07:40 出处:网络
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 re

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号