Curl message with multipart / form-data and JSON data

Is there a way to use curl to make a multipart/form-data message and indicate that the data is application/json ? It should not be curl.

+5
source share
1 answer

This is what I use and it works great

 curl -v -H "Content-Type:multipart/form-data" -F "someName={\"your\":\"json\"};type=application/json" 

Note. I am on Windows, so the requirement for double quotes

Or

 -F " someName=@someJsonFile.json ;type=application/json" 
+10
source

All Articles