Question

9
Replies
9011
Views
Nikhil Agarwal (Nikhil_Agarwal)

CA
Nikhil_Agarwal Member since 2015 37 posts
Posted: May 12, 2016
Last activity: September 12, 2017
Posted: 12 May 2016 13:31 EDT
Last activity: 12 Sep 2017 19:50 EDT
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.

 

Show More

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.?

Show Less
Data Integration
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.