rest-axios.js 427 B

12345678910111213141516
  1. import axios from 'axios'
  2. // TODO: make this one as settings (or find an other solution)
  3. let path = 'http://' + window.location.hostname + ':8984'
  4. // let path = 'http://dev.api.gdp.fr'
  5. // let path = 'http://localhost:8984'
  6. export const REST = axios.create({
  7. baseURL: path,
  8. // withCredentials: true,
  9. crossorigin: true,
  10. headers: {
  11. 'Accept': 'application/json'
  12. // 'Access-Control-Allow-Credentials': true
  13. }
  14. })