Reputation: 1655
We have the authorization header sent from a REST client and this can be seen in the inbound properties after the HTTP listener connector at the start of the mule flow in 3.7.
We call an API in the same flow using a http request configurator and want to send the same authorization header in the call.
We have added it as a header in the parameter section in the http request configurator but it fails. How do we do this?
Upvotes: 0
Views: 748
Reputation: 11606
You can directly copy the Authorization property using the copy-properties message processor, something like below:
<http:listener config-ref="HTTP_Listener_Configuration" path="/" allowedMethods="GET" doc:name="HTTP"/>
<copy-properties propertyName="Authorization" doc:name="Property" />
<http:request config-ref="HTTP_Request" path="/test" method="GET" doc:name="HTTP"/>
Upvotes: 1
Reputation: 31
I think you need to use a Message Property component and set your authorization in an Outbound Property before calling your HTTP:
Your Property will be:
I hope this can help you.
Upvotes: 0