Skip to main content
Module

x/carol/types.ts>HttpRequest

A Deno port of carlo
Go to Latest
interface HttpRequest
import { type HttpRequest } from "https://deno.land/x/carol@v1.0.2/types.ts";

Intercepted request instance that can be resolved to the client's liking.

Methods

url(): string

Network request url.

method(): string

Network request method.

headers(): Record<string, string>
resourceType(): string
abort(): Promise<unknown>

Aborts the request.

fail(): Promise<unknown>

Fails the request.

continue(): void

Falls through to the next handler.

deferToBrowser(overrides?: Overrides): Promise<unknown>

Continues the request with the provided overrides to the url, method or headers.

fulfill(data: { status?: number; headers?: Record<string, string>; body?: Uint8Array; }): Promise<unknown>

Fulfills the request with the given data.