import axios from 'axios';

let _axios = axios.create({
  baseURL: window.globalUrl.baseURL,
  timeout: 10000,
});

// _axios.interceptors.request.use(function (config) {
//   return config;
// }, function (error) {
//   return Promise.reject(error);
// });

_axios.interceptors.response.use(
  function (response) {
    return response['data'];
  },
  function (error) {
    return Promise.reject(error);
  }
);

export default _axios;
