Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RequestHandler

The http request handler.

Hierarchy

  • RequestHandler

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly queue

queue: Queue = ...

The request queue.

Methods

Private execute

  • execute(gotOptions: OptionsOfUnknownResponseBody, retries?: number): Promise<undefined | Record<PropertyKey, unknown>>
  • Execute the request.

    Parameters

    • gotOptions: OptionsOfUnknownResponseBody

      The got options for the request.

    • retries: number = 0

      The number of retries performed.

    Returns Promise<undefined | Record<PropertyKey, unknown>>

    The payload of the request if there is one.

push

  • push(gotOptions: OptionsOfUnknownResponseBody): Promise<undefined | Record<PropertyKey, unknown>>
  • Push the request to the queue waiting for its execution.

    Parameters

    • gotOptions: OptionsOfUnknownResponseBody

      The got options for the request.

    Returns Promise<undefined | Record<PropertyKey, unknown>>

    The payload of the request if there is one.

Generated using TypeDoc