简体   繁体   中英

Add custom static header information in response through Mashery

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")

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM