import axios from 'axios'; //const csrfParamName = document.querySelector('meta[name="csrf-param"]').content; //const csrfToken = document.querySelector('meta[name="csrf-token"]').content; const instance = axios.create({ baseURL: '/api/v1', timeout: 3000, responseType: 'json', headers: { post: { 'Content-Type': 'application/json' } }, //xsrfHeaderName: csrfParamName, }); export const Pokemon = { index: async () => instance.get('/pokemon'), get: async id => instance.get(`/pokemon/${id}`), }; const API = { // eslint-disable-line object-curly-newline Pokemon, }; export default API;