Class “Response”
Represents an HTTP Response as used by fetch()
.
Type: | Response extends Object |
Constructor: | public |
Singleton: | No |
Namespace: | global |
Direct subclasses: | None |
JSX Support: | No |
Constructor
new Response(body?, init?)
Parameter | Type | Description |
---|---|---|
body | Blob |
Optional. |
init | object |
Optional. |
init.headers | Headers |
Optional. |
init.status | number |
Optional. |
init.statusText | string |
Optional. |
Methods
arrayBuffer()
Returns: Promise<ArrayBuffer>
blob()
clone()
Returns: Response
json()
Returns: Promise
text()
Properties
bodyUsed
Type: | boolean |
Settable: | No |
headers
Type: | Headers |
Settable: | No |
ok
Type: | boolean |
Settable: | No |
status
Type: | number |
Settable: | No |
statusText
Type: | string |
Settable: | No |
type
Type: | 'basic' | 'cors' | 'default' | 'error' | 'opaque' |
Settable: | No |
url
Type: | string |
Settable: | No |