UtilsA.addAutoHeader
Adds an HTTP header to every consecutive HTTP request following this function call.
UtilsA.addAutoHeader(header, value, merge);
Arguments
Name | Description |
---|---|
header | (string) The name of the header to be added. |
value | (string) The value of the header to be added. |
merge | (boolean) A true setting indicates to merge the value with an existing header with the same name; false indicates to overwrite it. Note: The following headers cannot be modified by the merge argument: content-type, content-disposition, content-length, user-agent, referer, host, authorization, proxy-authorization, if-modified-since, if-unmodified-since, from, location, max-forwards |
Return value
A promise that will be fulfilled with no arguments.
Example
UtilsA.addAutoHeader("someCustomHeader", "someValue", true).then(function(){
TCA.done();
}).catch(function (error) {
TCA.doneWithError(error);
});