Interface BaseRequestOptions

Represents base options for making HTTP requests, excluding the body.

interface BaseRequestOptions {
    additionalDecode?: boolean;
    byteResponse?: boolean;
    cookies?: Record<string, any>;
    headers?: OutgoingHttpHeaders;
    hostOverride?: null | string;
    proxy?: string;
    redirect?: boolean;
}

Hierarchy (view full)

Properties

additionalDecode?: boolean

Whether to perform additional decoding.

byteResponse?: boolean

If true, indicates the response is in binary format, like base64-encoded images.

cookies?: Record<string, any>

Cookies for the request.

headers?: OutgoingHttpHeaders

The headers for the request.

hostOverride?: null | string

Used to override the Host header, typically needed when making requests directly to an IP address.

proxy?: string

The proxy server to use for the request.

redirect?: boolean

Whether to follow redirects.