I want to send json request and several files in one http request. I'm using multipart/mixed
request for that
curl -H "Content-Type: multipart/mixed" -F "request=@body.json; type=application/json" -F "file1=@2.xml" -F "file2=@2.pdf" -X POST hostName
request
field has application/json
content type and by that indication I define that this part is json request and other parts are files.
My question is how to inline request body in curl request. I try to use
curl -H "Content-Type: multipart/mixed" -F "request={"param1": "value1"}" -F "file1=@2.xml" -F "file2=@2.pdf" -X POST hostName
but content type of request
will be plain/text