(header: string, value: string)
| 265 | } |
| 266 | |
| 267 | public setRequestHeader(header: string, value: string) { |
| 268 | if (this._readyState !== this.OPENED || this._sendFlag) { |
| 269 | throw new Error("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': " + "The object's state must be OPENED."); |
| 270 | } |
| 271 | |
| 272 | if (isString(header) && isString(value)) { |
| 273 | this._options.headers[header] = value; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | public getAllResponseHeaders(): string { |
| 278 | if (this._readyState < 2 || this._errorFlag) { |
no test coverage detected