362
Views
2
Comments
Inject custom http headers to the request
Question

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.

2020-09-11 18-53-44
Stacey Levine

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

UserImage.jpg
Shahar Zion

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.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.