Can anyone help me for adding query parameter to a ServiceCallout Policy to call another proxy endpoint in same org.
<LocalTargetConnection>
<APIProxy>ProxyName</APIProxy>
<ProxyEndpoint>Proxy_Endpoint_Name</ProxyEndpoint>
</LocalTargetConnection>
What are the changes I have to make in the above code?
Solved! Go to Solution.
<ServiceCallout name="ServiceCallout-GeocodingRequest1"> <DisplayName>Inline request message</DisplayName> <Request variable="authenticationRequest"> <Set> <QueryParams> <QueryParam name="address">{request.queryparam.postalcode}</QueryParam> <QueryParam name="region">{request.queryparam.country}</QueryParam> <QueryParam name="sensor">false</QueryParam> </QueryParams> </Set> </Request> <Response>GeocodingResponse</Response> <Timeout>30000</Timeout> <LocalTargetConnection> <APIProxy>data-manager</APIProxy> <ProxyEndpoint>default</ProxyEndpoint> </LocalTargetConnection> </ServiceCallout>
This is clearly documented, did you try using the Set tag?
<ServiceCallout name="ServiceCallout-GeocodingRequest1"> <DisplayName>Inline request message</DisplayName> <Request variable="authenticationRequest"> <Set> <QueryParams> <QueryParam name="address">{request.queryparam.postalcode}</QueryParam> <QueryParam name="region">{request.queryparam.country}</QueryParam> <QueryParam name="sensor">false</QueryParam> </QueryParams> </Set> </Request> <Response>GeocodingResponse</Response> <Timeout>30000</Timeout> <LocalTargetConnection> <APIProxy>data-manager</APIProxy> <ProxyEndpoint>default</ProxyEndpoint> </LocalTargetConnection> </ServiceCallout>
This is clearly documented, did you try using the Set tag?
Thank you for the quick response. I thought the set tag is only applicable for ServiceCallout with HTTPTargetConnection.
The Set element works with LocalTargetConnection.
If there is something in the documentation that lead you to conclude that Set is applicable only with HTTPTargetConnection, let us know and we'll clarify it.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |