anvil/striker-ui/lib/fetchers/putFetch.ts
2021-08-10 17:07:10 -04:00

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;