materio-d9/web/themes/custom/materiotheme/vuejs/api/rest-axios.js

15 lines
376 B
JavaScript
Raw Normal View History

import axios from 'axios'
2019-04-10 10:47:45 +02:00
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
// console.log('drupalSettings', drupalSettings);
export const REST = axios.create({
2019-05-21 15:54:27 +02:00
baseURL: window.location.origin,
2019-05-21 16:42:36 +02:00
withCredentials: true,
headers: {
// Authorization: 'Bearer {token}',
2019-04-10 10:47:45 +02:00
"Content-Type": "application/json"
}
})