Share this page

# Utils.addAutoHeader

Adds an HTTP header to every consecutive HTTP request following this function call.

    Utils.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

Copy code

    Utils.addAutoHeader("someCustomHeader", "someValue", true);

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: