MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / setRequestHeader

Method setRequestHeader

src/Fetch.js:96–101  ·  view source on GitHub ↗

* Sets the value of an HTTP request header. * @param {string} header The name of the header. * @param {string} value The value of the header.

(header, value)

Source from the content-addressed store, hash-verified

94 * @param {string} value The value of the header.
95 */
96 setRequestHeader(header, value) {
97 if (this.readyState !== 1) {
98 throw new Error('setRequestHeader can only be called when state is OPENED.');
99 }
100 this._headers[header] = value;
101 }
102
103 /**
104 * This method is not effectively implemented because Fetch API relies on the

Callers 4

doXHRMethod · 0.80
Fetch.jsFile · 0.80
doXHRFunction · 0.80
libwget.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected