The Response
interface of the Fetch API represents the response to a request.
Documentation Response by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Static methods
Constructor
new(?body:Blob, ?init:Null<ResponseInit>)
new(?body:ArrayBufferView, ?init:Null<ResponseInit>)
new(?body:ArrayBuffer, ?init:Null<ResponseInit>)
new(?body:FormData, ?init:Null<ResponseInit>)
new(?body:URLSearchParams, ?init:Null<ResponseInit>)
new(?body:Dynamic, ?init:Null<ResponseInit>)
new(?body:String, ?init:Null<ResponseInit>)
Throws:
null | DOMError |
---|
Variables
read onlyok:Bool
Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
read onlyredirected:Bool
Indicates whether or not the response is the result of a redirect; that is, its URL list has more than one entry.
read onlystatusText:String
Contains the status message corresponding to the status code (e.g., OK
for 200
).