IFetchApiManager
katanakit-js / IFetchApiManager
Interface: IFetchApiManager
Section titled “Interface: IFetchApiManager”Defined in: types/core/http.ts:93
Contract of the fetch facade.
Methods
Section titled “Methods”useAddRequestInterceptor()
Section titled “useAddRequestInterceptor()”useAddRequestInterceptor(interceptor): () => void;Defined in: types/core/http.ts:97
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
interceptor |
RequestInterceptor |
Returns
Section titled “Returns”() => void
useBuildUrl()
Section titled “useBuildUrl()”useBuildUrl( apiName, endpointName, options?): string;Defined in: types/core/http.ts:96
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
options? |
UrlOptions |
Returns
Section titled “Returns”string
useDelete()
Section titled “useDelete()”useDelete<T>( apiName, endpointName, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:136
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>
useFetch()
Section titled “useFetch()”useFetch<T>( apiName, endpointName, options?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:98
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
options? |
FetchOptions<T> |
Returns
Section titled “Returns”Promise<FetchResult<T>>
useFetchApi()
Section titled “useFetchApi()”useFetchApi<T>( apiName, endpointName, options?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:103
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
options? |
FetchOptions<T> |
Returns
Section titled “Returns”Promise<FetchResult<T>>
useGet()
Section titled “useGet()”useGet<T>( apiName, endpointName, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:108
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>
useGetApi()
Section titled “useGetApi()”useGetApi<T>( apiName, endpointName, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:113
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>
useGetApis()
Section titled “useGetApis()”useGetApis(): ApisConfig;Defined in: types/core/http.ts:94
Returns
Section titled “Returns”useGetApisConfig()
Section titled “useGetApisConfig()”useGetApisConfig(): ApisConfig;Defined in: types/core/http.ts:95
Returns
Section titled “Returns”usePatch()
Section titled “usePatch()”usePatch<T>( apiName, endpointName, body?, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:130
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
body? |
unknown |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>
usePost()
Section titled “usePost()”usePost<T>( apiName, endpointName, body?, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:118
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
body? |
unknown |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>
usePut()
Section titled “usePut()”usePut<T>( apiName, endpointName, body?, urlOptions?): Promise<FetchResult<T>>;Defined in: types/core/http.ts:124
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
apiName |
string |
endpointName |
string |
body? |
unknown |
urlOptions? |
UrlOptions |
Returns
Section titled “Returns”Promise<FetchResult<T>>