Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ApiResponse<T>

The http library agnostic response.

Type parameters

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

Hierarchy

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

Indexable

[key: string]: any

Additional information.

Index

Properties

data?: T

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

headers: Headers
request?: (Record<string, any> & RequestInit) & (Record<string, any> & XMLHttpRequest)

The request that got this response.

status: number
statusText: string
url?: string

The url the request was sent to.

Methods

  • json(): Promise<Exclude<T, null | string>>

Generated using TypeDoc