How to Perform Post Call in apigee.

plvndinesh
Participant II

Hi

I have a Post web service and sample url

Url: http://xxxxx.restapiexample.com/api/v1/create

Payload:{some boby content}

I have Created a reverse proxy with my url

<TargetEndpoint>

<HTTPTargetConnection> <Properties/>

<URL>http://xxxxxx.restapiexample.com/api/v1/create</URL> </HTTPTargetConnection>

</TargetEndpoint>

can some one sugget how can i perform Post call and send the body.

(Without serviceCallout,JavaScript Policy).

0 2 343
2 REPLIES 2

Hello Dinesh,

If this is a pass-through API (payload sent as-is) to the downstream target service, Apigee will automatically copy over the payload. You can just trigger a POST request with a payload from any REST client (Postman, REST client, Fiddler, etc) to your reverse proxy.

If there is any transformation/manipulation required, you can access the payload through a flow variable request.content. Once you get a handle on this, you can perform manipulation using policies like JSONtoXML/XMLtoJSON, JavaScript, etc. Once your manipulation is complete, set it back to the variable request.content.

Hope that helps!!

Regards,

Girish

Thank you.