Inject custom http headers to the request

Hi,

is there anyone have an example how to inject list of http headers to the request before sending?

i have few rest api's and i want to inject them the same list of headers i have, so when im adding new or removing it will reflect on all request in all my api's in the module.


thanks.

There is an HTTPRequestHeaders extension that is part of the system. It has methods that will help you, although I use it most often for SOAP.  For REST, I can normally do whatever manipulation needed using OnBeforeRequest or OnBeforeRequestAdvanced.


Stacey

Stacey Levine wrote:

There is an HTTPRequestHeaders extension that is part of the system. It has methods that will help you, although I use it most often for SOAP.  For REST, I can normally do whatever manipulation needed using OnBeforeRequest or OnBeforeRequestAdvanced.


Stacey


How i can add dynamically http headers in the OnBeforeRequest or OnBeforeRequestAdvanced.