rest-axios.js 376 B

1234567891011121314
  1. import axios from 'axios'
  2. // https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
  3. // console.log('drupalSettings', drupalSettings);
  4. export const REST = axios.create({
  5. baseURL: window.location.origin,
  6. withCredentials: true,
  7. headers: {
  8. // Authorization: 'Bearer {token}',
  9. "Content-Type": "application/json"
  10. }
  11. })