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/#request-class} * * @public */ export declare class Request implements Body, json.Serializable, earl.Serializable { static of(method: string, url: URL, headers?: Headers, body?: ArrayBuffer): Request; private static _empty; static empty(): Request; private readonly _method; private readonly _url; private readonly _headers; private readonly _body; protected constructor(method: string, url: URL, headers: Headers, body: ArrayBuffer); /** * {@link https://fetch.spec.whatwg.org/#dom-request-method} */ get method(): string; /** * {@link https://fetch.spec.whatwg.org/#dom-request-url} */ get url(): URL; /** * {@link https://fetch.spec.whatwg.org/#dom-request-headers} */ get headers(): Headers; /** * {@link https://fetch.spec.whatwg.org/#dom-body-body} */ get body(): ArrayBuffer; toJSON(options?: json.Serializable.Options): Request.JSON; toEARL(): Request.EARL; toString(): string; } /** * @public */ export declare namespace Request { interface JSON { [key: string]: json.JSON; method: string; url: string; headers: Headers.JSON; body: string; } interface EARL extends earl.EARL { "@context": { http: "http://www.w3.org/2011/http#"; }; "@type": ["http:Message", "http:Request"]; "http:methodName": string; "http:requestURI": string; "http:headers": Headers.EARL; "http:body": Body.EARL; } function from(json: JSON): Result; function isRequest(value: unknown): value is Request; } //# sourceMappingURL=request.d.ts.map