Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RequestOptions

Hierarchy

  • Omit<RequestInitWithInternals, "method">
    • RequestOptions

Index

Properties

Optional [KoreanbotsInternal]

[KoreanbotsInternal]?: InternalOptions

Optional body

body?: null | string | Buffer | Uint8Array | Readable

Default: null

Optional bodyTimeout

bodyTimeout?: null | number

The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 30 seconds.

Optional headers

headers?: null | string[] | IncomingHttpHeaders

Default: null

Optional headersTimeout

headersTimeout?: null | number

The amount of time the parser will wait to receive the complete HTTP headers. Defaults to 30 seconds.

Optional idempotent

idempotent?: boolean

Whether the requests can be safely retried or not. If false the request won't be sent until all preceding requests in the pipeline have completed. Default: true if method is HEAD or GET.

Optional maxRedirections

maxRedirections?: number

Default: 0

Optional method

method?: HttpMethod

Optional opaque

opaque?: unknown

Default: null

Optional origin

origin?: string | URL

Optional path

path?: string

Optional signal

signal?: unknown

Default: null

Optional upgrade

upgrade?: null | string | boolean

Upgrade the request. Should be used to specify the kind of upgrade i.e. 'Websocket'. Default: method === 'CONNECT' || null.

Methods

Optional onInfo

  • onInfo(info: { headers: Record<string, string | string[]>; statusCode: number }): void
  • Default: null

    Parameters

    • info: { headers: Record<string, string | string[]>; statusCode: number }
      • headers: Record<string, string | string[]>
      • statusCode: number

    Returns void

Generated using TypeDoc