@sanpjs/runtime
Version:
San Pro Runtime
20 lines • 815 B
JavaScript
;
/**
* 简单包装 axios 请求
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.patch = exports.put = exports.post = exports.get = void 0;
const axios_1 = __importDefault(require("axios"));
const get = (url, config) => axios_1.default.get(url, config);
exports.get = get;
const post = (url, data, config) => axios_1.default.post(url, data, config);
exports.post = post;
const put = (url, data, config) => axios_1.default.put(url, data, config);
exports.put = put;
const patch = (url, data, config) => axios_1.default.patch(url, data, config);
exports.patch = patch;
exports.default = axios_1.default;
//# sourceMappingURL=fetch.js.map