Skip to main content

apiGet

apiGet<T>(endpoint, id?, queryParams?, headers?): Promise<T>

Sends a GET request to the specified API endpoint.

Type Parameters​

T​

T

Parameters​

endpoint​

string

API endpoint path.

id?​

string

Optional resource identifier.

queryParams?​

NameValue[]

NameValue - Optional array of query parameters.

headers?​

Headers

Optional custom headers.

Returns​

Promise<T>