I have an API proxy A where I am using an SC policy (attached to target endpoint response flow) to call another API endpoint from another API proxy B using the local path-chaining method. I am copying some headers from A and use them in SC policy like this (tried to upload the image here but unable to do so, please fix):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="SC-GetAllServices">
<DisplayName>SC-GetAllServices</DisplayName>
<FaultRules/>
<Properties/>
<Request clearPayload="true" variable="myRequest">
<Copy source="request">
<Headers>
<Header name="tokenSource"/>
<Header name="device"/>
</Headers>
</Copy>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</Request>
<Response>getAllServicesResponse</Response>
<LocalTargetConnection>
<Path>/v1/services/mock/id</Path>
<Properties/>
</LocalTargetConnection>
</ServiceCallout>
One of the headers tokenSource is being passed to proxy B but another one header device is not.
I checked the trace but saw that from the specific point this header is not available in the trace in the request headers section. Please guide me here. @Dino-at-Google