text: // import axios from 'axios';
  const axios = require('axios');
  class Axios {
      constructor(method, url, data = {}) {
          if (method.toUpperCase() == "POST") {
              this.res = new Promise((resolve, reject) => {
                  axios({
                      url: url,
                      method: method,
                      data: data
                  })
                      .then(res => {
                          this.res = res.data;
                          resolve(this.res);
                      })
                      .catch(err => {
                          console.log(err);
                      });
              });
          } else {
              this.res = new Promise((resolve, reject) => {
                  axios({
                      url: url,
                      method: method,
                      params: data
                  })
                      .then(res => {
                          this.res = res.data;
                          resolve(this.res);
                      })
                      .catch(err => {
                          console.log(err);
                      });
              });
          }
  
      }
  
      getRes() {
          return this.res;
      }
  
  }
  
  // export default Axios;
  module.exports = Axios;
  
  
  
  