Skip to Content

Add Body Parameters in HTTP REST API Post Method


I have a request in which i need to call a download REST API through ABAP, in order order to download a file. Using Postman i get a response but in ABAP i cannot identify how to give the file path in the body correctly. I try this:

lv_name = 'Content-Disposition'.
lv_value = 'form-data; name="path"; filename="foldername/filename" '.

name = lv_name " Name of the header field
value = lv_value " HTTP header field value ).

The reply i get is the following:

- java.lang.RuntimeException: RESTEASY007500: Could find no Content-Disposition header within part.

I can create the postman call using this cURL:

- curl -k -v -H "Expect:" -u OrgId:password -F path=OrgId/IN/filename hostname/rest/file/download --output c:/TEMP/filename

Please note that i need to provide the file name and the response should contain the file data.

Any ideas??

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.