axiosConfig.js 319 Bytes
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9
import axios from 'axios'
import nros from 'nr.os.js'

const service = axios.create({
  baseURL: window.osConfig.baseUrl,
  timeout: 120000
})

service.interceptors.request.use(config => {
10 11
  let token = window.nros.SDK.utils.getToken();
  config.headers.Authorization = token;
wangcong committed
12 13 14 15
  return config
})

export default service