mirror of
https://github.com/franjsco/tick3t
synced 2024-12-28 18:29:56 +01:00
improvement: remove httpClient
This commit is contained in:
parent
e7793fe063
commit
eba2663d18
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
export const httpClient = (url, options) => {
|
|
||||||
return fetch(url, options)
|
|
||||||
.then(response => {
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(response.status);
|
|
||||||
}
|
|
||||||
|
|
||||||
return response.json();
|
|
||||||
}).catch(err => {
|
|
||||||
throw new Error(err);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user