Options
All
  • Public
  • Public/Protected
  • All
Menu

A factory which can create Request objects. Useful for adding "default" handlers to requests.

Hierarchy

  • RequestFactory

Index

Constructors

constructor

Methods

addDefaultRejectCallback

  • addDefaultRejectCallback(fn: HandlerFunction): void
  • Add a function which will be invoked for every request that is rejected.

    Parameters

    • fn: HandlerFunction

      The function to invoke. The first argument will be the Request object, the second will be the rejection argument.

    Returns void

addDefaultResolveCallback

  • addDefaultResolveCallback(fn: HandlerFunction): void
  • Add a function which will be invoked for every request that is resolved.

    Parameters

    • fn: HandlerFunction

      The function to invoke. The first argument will be the Request object, the second will be the resolve argument.

    Returns void

addDefaultTimeoutCallback

  • addDefaultTimeoutCallback(fn: TimeoutFunction, durationMs: number): void
  • Add a function which will be invoked for every request that has not been resolved or rejected within a certain amount of time.

    Parameters

    • fn: TimeoutFunction

      The function to invoke. The first argument will be the Request object.

    • durationMs: number

      The number of milliseconds to wait for a resolution to the request.

    Returns void

newRequest

Generated using TypeDoc