UNPKG

wechaty-puppet-official-account

Version:
23 lines 804 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSimpleUnirest = void 0; const unirest_1 = __importDefault(require("unirest")); function getSimpleUnirest(endpoint) { // const auth = 'Basic ' + Buffer.from(apiKey + ':' + 'X').toString('base64') const headers = { // Authorization: auth, }; return { get: (url) => unirest_1.default .get(endpoint + url) .headers(headers), post: (url) => unirest_1.default .post(endpoint + url) .headers(headers), }; } exports.getSimpleUnirest = getSimpleUnirest; //# sourceMappingURL=simple-unirest.js.map