Skip to content
0

katanakit-js / IFetchApiManager

Interface: IFetchApiManager ​

Defined in: src/types/index.ts:472

Contract of the fetch facade.

Methods ​

useAddRequestInterceptor() ​

ts
useAddRequestInterceptor(interceptor): () => void;

Defined in: src/types/index.ts:482

Parameters ​

ParameterType
interceptorRequestInterceptor

Returns ​

() => void


useBuildUrl() ​

ts
useBuildUrl(
   apiName, 
   endpointName, 
   options?
): string;

Defined in: src/types/index.ts:479

Parameters ​

ParameterType
apiNamestring
endpointNamestring
options?UrlOptions

Returns ​

string


useDelete() ​

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

Defined in: src/types/index.ts:521

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>


useFetch() ​

ts
useFetch<T>(
   apiName, 
   endpointName, 
   options?
): Promise<FetchResult<T>>;

Defined in: src/types/index.ts:483

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
options?FetchOptions<T>

Returns ​

Promise<FetchResult<T>>


useFetchApi() ​

ts
useFetchApi<T>(
   apiName, 
   endpointName, 
   options?
): Promise<FetchResult<T>>;

Defined in: src/types/index.ts:488

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
options?FetchOptions<T>

Returns ​

Promise<FetchResult<T>>


useGet() ​

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

Defined in: src/types/index.ts:493

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>


useGetApi() ​

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

Defined in: src/types/index.ts:498

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>


useGetApis() ​

ts
useGetApis(): ApisConfig;

Defined in: src/types/index.ts:477

Returns ​

ApisConfig


useGetApisConfig() ​

ts
useGetApisConfig(): ApisConfig;

Defined in: src/types/index.ts:478

Returns ​

ApisConfig


usePatch() ​

ts
usePatch<T>(
   apiName, 
   endpointName, 
   body?, 
   urlOptions?
): Promise<FetchResult<T>>;

Defined in: src/types/index.ts:515

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
body?unknown
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>


usePost() ​

ts
usePost<T>(
   apiName, 
   endpointName, 
   body?, 
   urlOptions?
): Promise<FetchResult<T>>;

Defined in: src/types/index.ts:503

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
body?unknown
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>


usePut() ​

ts
usePut<T>(
   apiName, 
   endpointName, 
   body?, 
   urlOptions?
): Promise<FetchResult<T>>;

Defined in: src/types/index.ts:509

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterType
apiNamestring
endpointNamestring
body?unknown
urlOptions?UrlOptions

Returns ​

Promise<FetchResult<T>>

Released under the MIT License.