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

15 lines
406 B
JavaScript

import axios from 'axios'
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
// console.log('drupalSettings', drupalSettings);
export const JSONAPI = axios.create({
baseURL: `http://dev.materio.com/jsonapi`,
headers: {
Accept: 'application/vnd.api+json'
// Authorization: 'Bearer {token}',
// "Content-Type": "application/json"
}
})