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 "[email protected]; type=application/json" -F "[email protected]" -F "[email protected]" -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 "[email protected]" -F "[email protected]" -X POST hostName
but content type of request
will be plain/text