260909_01_ENH: patchForm 추가

This commit is contained in:
2026-09-09 11:38:47 +09:00
parent 78319274ad
commit 33a89d9da4
2 changed files with 14 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kri/common",
"version": "0.18.3",
"version": "0.18.4",
"description": "KRI 프런트엔드 공통 유틸리티",
"type": "module",
"main": "./dist/index.js",

View File

@@ -751,6 +751,18 @@ export const createHttpClient = (
});
};
const patchForm = <T = unknown>(
path: string,
form: FormData,
requestOptions?: RequestOptionsWithoutBody,
): Promise<T> => {
return request<T>(path, {
...(requestOptions ?? {}),
method: "PATCH",
form,
});
};
return {
request,
get,
@@ -760,6 +772,7 @@ export const createHttpClient = (
del,
postForm,
putForm,
patchForm,
};
};