You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
290 B
13 lines
290 B
3 years ago
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||
3 years ago
|
const putFetch = <T>(uri: string, data: T): Promise<any> => {
|
||
3 years ago
|
return fetch(uri, {
|
||
4 years ago
|
method: 'PUT',
|
||
|
headers: {
|
||
|
'Content-Type': 'application/json',
|
||
|
},
|
||
|
body: JSON.stringify(data),
|
||
|
});
|
||
|
};
|
||
|
|
||
3 years ago
|
export default putFetch;
|