package js.html
Available on js
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:
staticerror():ResponseReturns a new Response object associated with a network error.
staticredirect(url:String, status:Int = 302):ResponseCreates a new response with a different URL.
Throws:
null |
DOMError |
|---|
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 |
|---|
read onlybodyUsed:Boolread onlyheaders:HeadersContains the Headers object associated with the response.
read onlyok:BoolContains a boolean stating whether the response was successful (status in the range 200-299) or not.
read onlyredirected:BoolIndicates whether or not the response is the result of a redirect; that is, its URL list has more than one entry.
read onlystatus:IntContains the status code of the response (e.g., 200 for a success).
read onlystatusText:StringContains the status message corresponding to the status code (e.g., OK for 200).
read onlytype:ResponseTypeContains the type of the response (e.g., basic, cors).
read onlyurl:StringContains the URL of the response.
arrayBuffer():Promise<ArrayBuffer>Throws:
null |
DOMError |
|---|
blob():Promise<Blob>Throws:
null |
DOMError |
|---|
clone():ResponseCreates a clone of a Response object.
Throws:
null |
DOMError |
|---|
formData():Promise<FormData>Throws:
null |
DOMError |
|---|
json():Promise<Dynamic>Throws:
null |
DOMError |
|---|
text():Promise<String>Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Response.html