Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Return the response of a service callout as the proxy response

Not applicable

I have a service callout storing its response in a variable <Response>calloutResponse</Response>.

How can I copy the entire response into the proxy response? I realise I can use an assign message to copy specific components from one message to another but I can not see a simple way to simply copy the entire message (including all headers) into the response.

Solved Solved
1 9 3,380
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

One easy way to copy the entire response (including headers, payload etc) in one step is to use a javascript policy:

context.setVariable("response",context.getVariable("calloutResponse"))

Where "calloutResponse" can be the response returned as part of the service callout step.

View solution in original post

9 REPLIES 9