1 2 3 4 5 6 7 8 9 10 11 12
import axios from 'axios'; const requests = axios.create({ baseURL: 'http://localhost:3030', headers: { 'Authorization': localStorage.getItem('token') } }); export const { get, post, put } = requests; export default requests;