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