Skip to content
0

katanakit-js / usePatch

Function: usePatch() ​

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

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

PATCH helper over a registered API endpoint.

Type Parameters ​

Type ParameterDefault type
Tunknown

Parameters ​

ParameterTypeDescription
apiNamestringThe registered API key.
endpointNamestringThe endpoint key within the API.
body?unknownOptional request body (auto-serialized to JSON unless raw).
urlOptions?UrlOptionsOptional URL building options.

Returns ​

Promise<FetchResult<T>>

A FetchResult with data or error.

Released under the MIT License.