anvil/striker-ui/lib/fetchers/putFetch.ts

12 lines
278 B
TypeScript
Raw Normal View History

/* 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),
});
2021-07-21 21:56:48 +00:00
export default putFetch;