parent
ae628edb24
commit
92601e532e
4 changed files with 9 additions and 10 deletions
@ -1,13 +1,12 @@ |
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */ |
/* eslint-disable @typescript-eslint/no-explicit-any */ |
||||||
const putJSON = <T>(uri: string, data: T): Promise<any> => { |
const putFetch = <T>(uri: string, data: T): Promise<any> => { |
||||||
return fetch(uri, { |
return fetch(uri, { |
||||||
method: 'PUT', |
method: 'PUT', |
||||||
headers: { |
headers: { |
||||||
'Content-Type': 'application/json', |
'Content-Type': 'application/json', |
||||||
'Keep-Alive': 'timeout=60', |
|
||||||
}, |
}, |
||||||
body: JSON.stringify(data), |
body: JSON.stringify(data), |
||||||
}); |
}); |
||||||
}; |
}; |
||||||
|
|
||||||
export default putJSON; |
export default putFetch; |
Loading…
Reference in new issue