(response, init, body)
| 12943 | get status() { |
| 12944 | webidl.brandCheck(this, _Response); |
| 12945 | return this[kState].status; |
| 12946 | } |
| 12947 | // Returns whether response’s status is an ok status. |
| 12948 | get ok() { |
| 12949 | webidl.brandCheck(this, _Response); |
| 12950 | return this[kState].status >= 200 && this[kState].status <= 299; |
| 12951 | } |
| 12952 | // Returns response’s status message. |
| 12953 | get statusText() { |
| 12954 | webidl.brandCheck(this, _Response); |
| 12955 | return this[kState].statusText; |
| 12956 | } |
| 12957 | // Returns response’s headers as Headers. |
| 12958 | get headers() { |
| 12959 | webidl.brandCheck(this, _Response); |
| 12960 | return this[kHeaders]; |
| 12961 | } |
| 12962 | get body() { |
| 12963 | webidl.brandCheck(this, _Response); |
| 12964 | return this[kState].body ? this[kState].body.stream : null; |
| 12965 | } |
| 12966 | get bodyUsed() { |
| 12967 | webidl.brandCheck(this, _Response); |
| 12968 | return !!this[kState].body && util.isDisturbed(this[kState].body.stream); |
| 12969 | } |
| 12970 | // Returns a clone of response. |
| 12971 | clone() { |
| 12972 | var _a; |
| 12973 | webidl.brandCheck(this, _Response); |
| 12974 | if (bodyUnusable(this)) { |
| 12975 | throw webidl.errors.exception({ |
| 12976 | header: "Response.clone", |
| 12977 | message: "Body has already been consumed." |
| 12978 | }); |
no test coverage detected