Skip to main content
Version: Next

HttpRequestOptions

Additional options for HTTP requests that need to be handled separately before passing to BaseHttpClient.

Hierarchy

Index

Properties

optionalinheritedbody

body?: Readable

optionalinheritedcookieJar

cookieJar?: CookieJar

optionalinheritedencoding

encoding?: BufferEncoding

optionalinheritedfollowRedirect

followRedirect?: boolean | (response) => boolean

optionalform

form?: Record<string, string>

A form to be sent in the HTTP request body (URL encoding will be used)

optionalinheritedheaderGenerator

headerGenerator?: { getHeaders: (options) => Record<string, string> }

Type declaration

  • getHeaders: (options) => Record<string, string>
      • (options): Record<string, string>
      • Parameters

        • options: Record<string, unknown>

        Returns Record<string, string>

optionalinheritedheaderGeneratorOptions

headerGeneratorOptions?: Record<string, unknown>

optionalinheritedheaders

headers?: Headers

optionalinheritedinsecureHTTPParser

insecureHTTPParser?: boolean

optionaljson

json?: unknown

Arbitrary object to be JSON-serialized and sent as the HTTP request body

optionalinheritedmaxRedirects

maxRedirects?: number

optionalinheritedmethod

optionalpassword

password?: string

Basic HTTP Auth password

optionalinheritedproxyUrl

proxyUrl?: string

optionalsearchParams

searchParams?: SearchParams

Search (query string) parameters to be appended to the request URL

optionalinheritedsessionToken

sessionToken?: object

optionalinheritedsignal

signal?: AbortSignal

optionalinheritedthrowHttpErrors

throwHttpErrors?: boolean

optionalinheritedtimeout

timeout?: number

inheritedurl

url: string | URL

optionalinheriteduseHeaderGenerator

useHeaderGenerator?: boolean

optionalusername

username?: string

Basic HTTP Auth username