setRequestHeader method

void setRequestHeader(
  1. String header,
  2. String value
)

Sets/updates an HTTP header of the AjaxRequest. If there is already an existing header with the same name, the values are merged into one single request header. For security reasons, some headers can only be controlled by the user agent. These headers include the forbidden header names and forbidden response header names.

Implementation

void setRequestHeader(String header, String value) {
  _newHeaders[header] = value;
}