Forum Discussion

pablopc's avatar
13 years ago

Unable to send multipart/mixed REST requests correctly

Hi!

Im trying to send a POST multipart/mixed request which should follow this structure with different types of attachments encoded in binary:

Header:

Content-Type: multipart/mixed;boundary=BOUNDARY

Body:

--BOUNDARY
Content-Type: application/json

//JSON REQUEST

--BOUNDARY
Content-Type: image/gif
Content-Transfer-Encoding: binary

//attachment_1

--BOUNDARY
Content-Type: image/jpeg
Content-Transfer-Encoding: binary

//attachment_2

--BOUNDARY--


The problem is that Im unable to reproduce this request using the "Attachments" Tab in SoapUI with multipart/mixed Content-Type while it works perfectly with multipart/form-data.
Either setting multipart/mixed in the request's Content-Type header or in Media Type, with or without the boundary value, the request is sent without attachments or with incorrect boundary.

Thanks.
No RepliesBe the first to reply