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.
12 lines
256 B
12 lines
256 B
4 years ago
|
const putJSON = <T>(uri: string, data: T): void => {
|
||
|
fetch(`${process.env.NEXT_PUBLIC_API_URL}${uri}`, {
|
||
|
method: 'PUT',
|
||
|
headers: {
|
||
|
'Content-Type': 'application/json',
|
||
|
},
|
||
|
body: JSON.stringify(data),
|
||
|
});
|
||
|
};
|
||
|
|
||
|
export default putJSON;
|