The Fetch API Response interface (undici).

See also:

Static methods

staticerror():Response

Returns a new Response object associated with a network error.

staticjson(data:Any, ?init:ResponseInit):Response

Creates a new response with a JSON body.

staticredirect(url:String, ?status:Int):Response

staticredirect(url:URL, ?status:Int):Response

Creates a new response with a different URL.

Constructor

new(?body:BodyInit, ?init:ResponseInit)

Variables

read onlybody:Null<ReadableStream>

A ReadableStream of the body contents, or null.

read onlybodyUsed:Bool

read onlyheaders:Headers

read onlyok:Bool

read onlyredirected:Bool

read onlystatus:Int

read onlytype:String

read onlyurl:String

Methods