Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/dom_types.ts>Response

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface Response
implements Body
import { type Response } from "https://deno.land/x/deno@v0.28.0/cli/js/dom_types.ts";

Properties

readonly
headers: Headers

Contains the Headers object associated with the response.

readonly
ok: boolean

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

readonly
redirected: boolean

Indicates whether or not the response is the result of a redirect; that is, its URL list has more than one entry.

readonly
status: number

Contains the status code of the response (e.g., 200 for a success).

readonly
statusText: string

Contains the status message corresponding to the status code (e.g., OK for 200).

readonly
trailer: Promise<Headers>
readonly
type: ResponseType

Contains the type of the response (e.g., basic, cors).

readonly
url: string

Contains the URL of the response.

Methods

clone(): Response

Creates a clone of a Response object.