graphql-axios.js 487 B

1234567891011121314151617
  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. console.log(window.location);
  5. export const MGQ = axios.create({
  6. baseURL: window.location.origin+`/mgq`,
  7. withCredentials: true,
  8. headers: {
  9. 'Accept': 'application/json',
  10. // Accept: 'application/vnd.api+json'
  11. // Authorization: 'Basic {token}',
  12. "Content-Type": "application/json"
  13. }
  14. })