Options
All
  • Public
  • Public/Protected
  • All
Menu

Module fetch/fetchToken

Index

Functions

Functions

Const default

  • default(apiUrl: string, tokenFetchBody: stringIndex, fetch?: fetchAdapter, onError?: (err: Error) => void): Promise<void | TJsonApiBody>
  • Fetch a token from Drupal

    Parameters

    • apiUrl: string

      the api url for the JON:API endpoint

    • tokenFetchBody: stringIndex

      object containing body parameters for the token request

    • fetch: fetchAdapter = ...

      fetch compatible function

    • onError: (err: Error) => void = ...
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns Promise<void | TJsonApiBody>

    a promise containing the token api response

Generated using TypeDoc