Type Alias ApiRequestOptions

ApiRequestOptions: {
    api?: string;
    debug?: boolean;
    headers?: () => Record<string, string>;
    onError?: (error: ApiRequestError) => void | Promise<void>;
    origin?: string;
}

Request options

Type declaration

  • Optionalapi?: string

    API to use, e.g. publishing/v2.0. Will be prefixed to the path

  • Optionaldebug?: boolean
  • Optionalheaders?: () => Record<string, string>

    Request headers for all requests

  • OptionalonError?: (error: ApiRequestError) => void | Promise<void>

    Callback for request errors

  • Optionalorigin?: string

    Host origin to make request against, including protocol and port