ResponseWithUrl
Hierarchy
- Response
- ResponseWithUrl
Implements
Index
Constructors
constructor
Parameters
body: null | BodyInit
init: ResponseInit & { url?: string }
Returns ResponseWithUrl
Properties
externalreadonlyinheritedbody
externalreadonlyinheritedbodyUsed
externalreadonlyinheritedheaders
The headers read-only property of the Response interface contains the Headers object associated with the response.
externalreadonlyinheritedok
The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
externalreadonlyinheritedredirected
The redirected read-only property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
externalreadonlyinheritedstatus
The status read-only property of the Response interface contains the HTTP status codes of the response.
externalreadonlyinheritedstatusText
The statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
externalreadonlyinheritedtype
The type read-only property of the Response interface contains the type of the response. The type determines whether scripts are able to access the response body and headers.
url
The url read-only property of the Response interface contains the URL of the response. The value of the url property will be the final URL obtained after any redirects.
Methods
externalinheritedarrayBuffer
Returns Promise<ArrayBuffer>
externalinheritedblob
Returns Promise<Blob>
externalinheritedbytes
Returns Promise<Uint8Array<ArrayBuffer>>
externalinheritedclone
The
clone()method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.Returns Response
externalinheritedformData
Returns Promise<FormData>
externalinheritedjson
Returns Promise<any>
externalinheritedtext
Returns Promise<string>
staticexternalinheritederror
The
error()static method of the Response interface returns a new Response object associated with a network error.Returns Response
staticexternalinheritedjson
The
json()static method of the Response interface returns a Response that contains the provided JSON data as body, and a Content-Type header which is set to application/json. The response status, status message, and additional headers can also be set.Parameters
externaldata: any
externaloptionalinit: ResponseInit
Returns Response
staticexternalinheritedredirect
The
redirect()static method of the Response interface returns a Response resulting in a redirect to the specified URL.Parameters
externalurl: string | URL
externaloptionalstatus: number
Returns Response
A Response class that includes the original request URL.
This class extends
ResponsefromfetchAPI and is fully compatible with this.