UNPKG

wechaty-puppet-official-account

Version:
17 lines 493 B
import unirest from 'unirest'; function getSimpleUnirest(endpoint) { // const auth = 'Basic ' + Buffer.from(apiKey + ':' + 'X').toString('base64') const headers = { // Authorization: auth, }; return { get: (url) => unirest .get(endpoint + url) .headers(headers), post: (url) => unirest .post(endpoint + url) .headers(headers), }; } export { getSimpleUnirest }; //# sourceMappingURL=simple-unirest.js.map