I want to send data to another api and view the data

I am using service call out policy to send data to another api.

How do i see the data in the other end.Do i create another api proxy?I am presently using http://httpbin.org/anything.

I want to see the data/response at the second api .Is it possible?At the 2nd api end I want to see the data...

Please guide me..The 2nd api has to to get the data in the response.

0 1 210
1 REPLY 1

The Service Callout policy has a <Response>calloutResponse</Response> tag.

https://docs.apigee.com/api-platform/reference/policies/service-callout-policy#response

Use Assign Message or Javascript policy to set it as a response,

<AssignMessage name="set-payload-3">
  <Set>
    <Payload contentType="application/json">
      {calloutResponse}
    </Payload>
  </Set>
</AssignMessage>
context.setVariable("response",context.getVariable("calloutResponse"))