• Returns

    The parsed API response object (await response.json())

    Throws

    ApiError if unauthorized

    Parameters

    • connectionOptions: {
          apiUrl: string;
          headers: Object;
      }
      • apiUrl: string

        Target annotation database API URL

      • headers: Object

        The headers responsible for authenticating the request and the Hypothes.is Accept header

    • endpoint: string

      Target API endpoint, e.g. /annotations

    • fetchOptions: undefined | RequestInit = {}

      Anything fetch accepts as second parameter, including additional headers

    Returns Promise<ReturnType<typeof JSON.parse>>

Generated using TypeDoc