2017-11-09 11:19:53 +00:00
|
|
|
import axios from 'axios'
|
2017-11-10 15:57:55 +00:00
|
|
|
// import auth from '../auth'
|
2017-11-23 14:20:52 +00:00
|
|
|
// import config from '../../static/config'
|
|
|
|
// import config from 'config'
|
|
|
|
let config = require('../../siteconfig.json')
|
2017-11-09 11:19:53 +00:00
|
|
|
|
|
|
|
export const HTTP = axios.create({
|
2017-11-23 14:20:52 +00:00
|
|
|
baseURL: config.API_URL,
|
2017-11-09 11:19:53 +00:00
|
|
|
headers: {
|
2017-11-10 15:57:55 +00:00
|
|
|
'Authorization': 'Bearer ' + localStorage.getItem('token')
|
2017-11-09 11:19:53 +00:00
|
|
|
}
|
|
|
|
})
|