import { URL } from "@siteimprove/alfa-url"; import type * as earl from "@siteimprove/alfa-earl"; import type * as json from "@siteimprove/alfa-json"; import type { Result } from "@siteimprove/alfa-result"; import type { Body } from "./body.ts"; import { Headers } from "./headers.ts"; /** * {@link https://fetch.spec.whatwg.org/#response-class} * * @public */ export declare class Response implements Body, json.Serializable, earl.Serializable { static of(url: URL, status: number, headers?: Headers, body?: ArrayBuffer): Response; private static _empty; static empty(): Response; private readonly _url; private readonly _status; private readonly _headers; private readonly _body; protected constructor(url: URL, status: number, headers: Headers, body: ArrayBuffer); /** * {@link https://fetch.spec.whatwg.org/#dom-response-url} */ get url(): URL; /** * {@link https://fetch.spec.whatwg.org/#dom-response-status} */ get status(): number; /** * {@link https://fetch.spec.whatwg.org/#dom-response-headers} */ get headers(): Headers; /** * {@link https://fetch.spec.whatwg.org/#dom-body-body} */ get body(): ArrayBuffer; toJSON(options?: json.Serializable.Options): Response.JSON; toEARL(): Response.EARL; toString(): string; } /** * @public */ export declare namespace Response { interface JSON { [key: string]: json.JSON; url: string; status: number; headers: Headers.JSON; body: string; } interface EARL extends earl.EARL { "@context": { http: "http://www.w3.org/2011/http#"; }; "@type": ["http:Message", "http:Response"]; "http:statusCodeValue": number; "http:headers": Headers.EARL; "http:body": Body.EARL; } function from(json: JSON): Result; function isResponse(value: unknown): value is Response; } //# sourceMappingURL=response.d.ts.map