Question

9
Replies
8496
Views
Nikhil_Agarwal Member since 2015 37 posts
Posted: 4 years ago
Last activity: 3 years ago
Closed
Solved

How to pass POST request in body using REST connector..?

Hello Friends

I have a REST service which accepts json payload in http body.

I designed a REST connector and chose POST as method to fire request. It created the integration class with property .request (Page property which contains .body_POST which is another page property pointing to another class)

E.g.Sample json payload is like  {"key1":"value1", "key2":"value2", "key3":"value3"}

E.g. Org-Int-RESTAPI {.request}

       Org-Int-RESTAPI_REQUEST (.body_POST)

       Org-Int-RESTAPI_Body_POST

Note : request and body_post don't pattern-inherit from RESTAPI. It uses "_" rather than "-".

a) I tried creating text properties in Org-Int-RESTAPI_Body_POST and then call Connect-REST (MapFrom : JSON, Map from Key: .request) in Activity using this request, but I get
     the HTTP response code of 415 indicated a client error.

 

b) Then I tried MapFrom : CONSTANT, Map from Key: {"key1":"value1", "key2":"value2", "key3":"value3"}. But it didn't work either.


Can someone assist with this.?

Data Integration
Moderation Team has archived post
Share this page LinkedIn