bugly.js
Version:
Bugly.js helps beginners and time-pressed people!
26 lines (21 loc) • 507 B
JavaScript
class Fetch {
async get(url) {
const response = await fetch(url);
return response;
}
async post(url, body, headers) {
const response = await fetch(url, { method: "POST", body, headers });
return response;
};
async delete(url, headers) {
const response = await fetch(url, {
method: 'DELETE',
headers: {
'Content-type': 'application/json',
...headers
}
});
return response;
};
}
module.exports = { Fetch }