const request = async (args) => {
    const header = {
        'X-Requested-With': 'XMLHttpRequest',
        'content-type': 'application/x-www-form-urlencoded',
    };

    const [error, response] = await uni.request({
        url: args.url,
        method: args.method || 'get',
        data: args.data,
        header: header
    });

    return Promise.resolve(response);
};

export default request