Interface ApiResponse<T>

The http library agnostic response.

Type Parameters

  • T = any[] | Record<string, any> | string | null


  • Pick<Response, "headers" | "status" | "statusText">
    • ApiResponse


[key: string]: any


data?: T

The parsed response content. (in case of libraries like axios)

headers: Headers
json?: (() => Promise<Exclude<T, null | string>>)

Type declaration

    • (): Promise<Exclude<T, null | string>>
    • The fetch json method resolving to the given type.

      Returns Promise<Exclude<T, null | string>>

request?: Object

The request that got this response.

status: number
statusText: string
url?: string

The url the request was sent to.

Generated using TypeDoc