12 lines
278 B
TypeScript
12 lines
278 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
const putFetch = <T>(uri: string, data: T): Promise<any> =>
|
|
fetch(uri, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(data),
|
|
});
|
|
|
|
export default putFetch;
|