Skip to Content
author's profile photo Former Member
Former Member

Receiver REST - Form-Data

I need to call a REST service that accepts only form-data . In POSTMAN, I am able to to call the service by using the POST operation, entering the service end point , and in the BODY tab, I select "form-data" and pass the values to the key that the service expects . This service does not accept XML or JSON in the Request body .

How do I configure this in the Receiver REST adapter?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 09, 2015 at 06:57 AM

    Hello,

    AFAIK, Rest Adapter is capable to use Media types only application/json and application/xml

    anyway, you can try like below

    i wonder if that works, please let us know...also you please check with SAP if they corrected in latest Service pack.


    asdasa.PNG (66.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2015 at 02:59 AM

    Simple java map , construct the request as a String and write it to the OutputStream. Map it to any dummy message type.

    Also, in the REST Receiver need to configure Content-Type as application/x-www-form-urlencoded . But simply setting in the Header fields didnt work.

    Using your suggestion, set it using MTB Transform.ContentType parameter. And that worked, thanks.. Seems like a bug in the Receiver REST adapter.

    Add a comment
    10|10000 characters needed characters exceeded

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.