aboutsummaryrefslogtreecommitdiff
path: root/src/requests.ts
blob: fa84c4a5efd4495f1344b2dab507110b52758cb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import axios from 'axios';

const requests = axios.create({
  baseURL: 'http://localhost:3030',
});

requests.interceptors.request.use(config => {
  config.headers.Authorization = localStorage.getItem('token');
  return config;
});

export const { get, post, put } = requests;
export default requests;