Skip to content
0

katanakit-js / useGetApi

Function: useGetApi() ​

ts
function useGetApi<T>(
   apiName, 
   endpointName, 
   urlOptions?
): Promise<FetchResult<T>>;

Defined in: src/core/services/http.service.ts:760

GET helper over a registered API endpoint. Alias for useGet.

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterTypeDescription
apiNamestringThe registered API key.
endpointNamestringThe endpoint key within the API.
urlOptions?UrlOptionsOptional URL building options.

Returns ​

Promise<FetchResult<T>>

A FetchResult with data or error.

Released under the MIT License.