Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Adapter<T>

Type parameters

  • T = any

    The type of data returned on the {@link Response}.

Hierarchy

  • Adapter

Callable

  • Adapter(request: Request): Promise<Response<T>>
  • Processes a Request and returns a Promise resolving to a Response object.

    IMPORTANT: An adapter should never throw an Error or return a rejected promise. Instead, set the {@link MetaData.error meta.error} property to true or else return a status code outside of the 200-299 range.

    Parameters

    • request: Request

      The data operation request to fulfill.

    Returns Promise<Response<T>>

    A Promise resolved with a Response instance.