2021-07-14 16:30:11 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2022-03-19 02:23:36 +00:00
|
|
|
const putFetch = <T>(uri: string, data: T): Promise<any> =>
|
|
|
|
fetch(uri, {
|
2021-05-25 15:45:05 +00:00
|
|
|
method: 'PUT',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
},
|
|
|
|
body: JSON.stringify(data),
|
|
|
|
});
|
|
|
|
|
2021-07-21 21:56:48 +00:00
|
|
|
export default putFetch;
|