mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
15 lines
276 B
JavaScript
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();
|