Fetch data from a remote service and add that to request header

[New to tyk and setting up now]

Am looking to modify the request header before it reaches the actual api.
Normal flow looks like this

user —> gateway → service A

user makes a request and gateway forwards it to service A.

Now before the request is forwarded to service A, I want to modify the request header by adding two more header values. These values have to be fetched from some other service(API).

How can I do this in tyk?