UseFetchApi
katanakit-js / useFetchApi
Function: useFetchApi()
Section titled “Function: useFetchApi()”function useFetchApi<T>( apiName, endpointName, options?): Promise<FetchResult<T>>;Defined in: core/services/http.service.ts:664
Fetches a registered endpoint and returns a Safe Result. Alias for useFetch.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
apiName |
string |
The registered API key. |
endpointName |
string |
The endpoint key within the API. |
options? |
FetchOptions<T> |
Optional fetch options. |
Returns
Section titled “Returns”Promise<FetchResult<T>>
A FetchResult with data or error.