Add custom static header information in response through Mashery

318 Views Asked by At

I am new to Mashery and just wanted to know if it is possible in Mashery to add custom static header information in response to a call and how?

If yes, then is it possible to make this header information enrichment conditional based upon the success or error HTTP code received from the target API?

I think if it is possible, then it should be possible by using the "Call Transformation" or "More Settings" links but I can't find the option to add a header (but I can find the drop header option in "More Settings")

1

There are 1 best solutions below

0
On

It is possible to add custom static header in Mashery using the adapter 'com.mashery.proxy.core.add-headers-processor'.

Below configuration will add the header 'headername' in the request processed from mashery.

Processing Adapter = com.mashery.proxy.core.add-headers-processor
Perform Pre-processing = Enabled
Data to make available for pre-processing = headername:testvalue.

I am not aware of the possibility to add this header conditionally.