Steve N
Steve N

Reputation: 2737

Dynamic Auth / Headers in Mulesoft HTTP connector

I frequently encounter scenarios where I would like to dynamically configure headers on outbound HTTP/HTTPS requests within a Mulesoft flow and I cannot figure out a nice way to do this.

For example, I have tried, in an HTTP connector, doing the following in the associated configuration:

Configuration

And I have tried using the HTTP Connector's HOST override setting to pass in a user/password (even statically):

And another try

Is there a better way here? It's gotta be a pretty common issue that one flow may need to broker requests with different credentials based on who is calling...

Upvotes: 0

Views: 605

Answers (1)

Robert
Robert

Reputation: 17

AFAIK, the dynamic values can be set as flow variables, which in turn to be configured in HTTP headers/path.

Then the problem is changed to how make flow variable dynamic, it depends on the situation you have, basically set variable with a value in runtime (retrieved from request payload, incoming request's header etc.), then it will act as dynamically set in your HTTP requester followed.

Upvotes: 0

Related Questions