cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver RESTAdapter multipart request with attachment

franciscoj_luis
Discoverer
535

Hi all.

I need to call rest service with a request like this:

POST /v1/padessign/sign HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file
Content-Type: application/pdf

[PDF]
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=data
Content-Type: application/json

[JSON object]

I'm using the rest adapter with request format JSON and support attachments, but I don't know how to set the Content-Disposition of attachment (pdf) part.

I get this output:

POST /api/v1 HTTP/1.1
Content-Type: multipart/form-data; boundary=SAP_e3808eda-436d-11eb-ca11-0000003e91c6_END

--SAP_e3808eda-436d-11eb-ca11-0000003e91c6_END
Content-ID: <payload-005056BE1D4B1EDB90@sap.com>
CONTENT-DISPOSITION: form-data;name="data"
Content-Type: application/json
Content-Description: MainDocument

[JSON content]
--SAP_e3808eda-436d-11eb-ca11-0000003e91c6_END
content-id: <payload-005056BE1D4B1EDB90@sap.com>
content-type: application/pdf

[PDF content]

Could someone help me or give me some idea how to insert the missing MIME part header?

Thanks for your time.

Hi Luis,

Good Day!!

Did you solve this issue?? if yes please provide your inputs o it.

Thanks,

Sandeep

Accepted Solutions (0)

Answers (0)