I want to add a new header 'new-header' to the request if one of my javascript methods returns true. I'm new on this, can anyone help me?
Solved! Go to Solution.
Hello, in your javascript file you can do this
context.setVariable('request.header.<YourHeaderKey>','<YourHeaderValue>');
example for a header called "new-header", applied to the Request object:
if (myFunction()) { // truthy context.setVariable('request.header.new-header','any-value-here'); }
Hello, in your javascript file you can do this
context.setVariable('request.header.<YourHeaderKey>','<YourHeaderValue>');
example for a header called "new-header", applied to the Request object:
if (myFunction()) { // truthy context.setVariable('request.header.new-header','any-value-here'); }
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |