()
| 275 | } |
| 276 | |
| 277 | public getAllResponseHeaders(): string { |
| 278 | if (this._readyState < 2 || this._errorFlag) { |
| 279 | return ''; |
| 280 | } |
| 281 | |
| 282 | let result = ''; |
| 283 | |
| 284 | for (const i in this._headers) { |
| 285 | result += i + ': ' + this._headers[i] + '\r\n'; |
| 286 | } |
| 287 | |
| 288 | return result.substr(0, result.length - 2); |
| 289 | } |
| 290 | |
| 291 | public getResponseHeader(header: string): string { |
| 292 | if (isString(header) && this._readyState > 1 && this._headers && !this._errorFlag) { |