const request = require('request');
const util = require('util');
const getPromise = util.promisify(request.get);

module.exports = async function (url, data) {
    let result = await getPromise({url:url, headers: {
            'Authorization': 'Basic cm9vdDpOSlU2N3NvZnR3YXJl'
        }
    });
    // 可以加入 try catch 捕获异常  也可以加 .catch()
    console.log("result" , result);
    return result;
};
