* @param {!XMLHttpRequest|!XMLHttpRequestDef} xhr
(xhr)
| 110 | * @param {!XMLHttpRequest|!XMLHttpRequestDef} xhr |
| 111 | */ |
| 112 | constructor(xhr) { |
| 113 | /** @private @const {!XMLHttpRequest|!XMLHttpRequestDef} */ |
| 114 | this.xhr_ = xhr; |
| 115 | |
| 116 | /** @const {number} */ |
| 117 | this.status = this.xhr_.status; |
| 118 | |
| 119 | /** @const {string} */ |
| 120 | this.statusText = this.xhr_.statusText; |
| 121 | |
| 122 | /** @const {boolean} */ |
| 123 | this.ok = this.status >= 200 && this.status < 300; |
| 124 | |
| 125 | /** @const {!FetchResponseHeaders} */ |
| 126 | this.headers = new FetchResponseHeaders(xhr); |
| 127 | |
| 128 | /** @type {boolean} */ |
| 129 | this.bodyUsed = false; |
| 130 | |
| 131 | /** @type {?ReadableStream} */ |
| 132 | this.body = null; |
| 133 | |
| 134 | /** @type {?string} */ |
| 135 | this.url = xhr.responseURL; |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Create a copy of the response and return it. |
nothing calls this directly
no outgoing calls
no test coverage detected