parent
099b2c9470
commit
8e5dccac03
7 changed files with 42 additions and 69 deletions
@ -0,0 +1,12 @@ |
||||
import axios, { Axios } from 'axios'; |
||||
|
||||
import API_BASE_URL from './consts/API_BASE_URL'; |
||||
|
||||
const api = new Axios({ |
||||
baseURL: API_BASE_URL, |
||||
transformRequest: axios.defaults.transformRequest, |
||||
transformResponse: axios.defaults.transformResponse, |
||||
validateStatus: (status) => status < 400, |
||||
}); |
||||
|
||||
export default api; |
@ -1,10 +0,0 @@ |
||||
import { Axios } from 'axios'; |
||||
|
||||
import API_BASE_URL from '../consts/API_BASE_URL'; |
||||
|
||||
const mainAxiosInstance = new Axios({ |
||||
baseURL: API_BASE_URL, |
||||
validateStatus: (status) => status < 400, |
||||
}); |
||||
|
||||
export default mainAxiosInstance; |
Loading…
Reference in new issue