2022-11-23 18:58:31 +08:00

15 lines
276 B
JavaScript

//import xx from f.js
class jFeatch {
async get(url) {
const r = await fetch(url);
return await r.json();
}
async post(url, params) {
const r = await fetch(url, { ...params, method: "POST" });
return await r.json();
}
}
export default new jFeatch();