blob: 463e0d86bb4d2dfeeda915edbabdc1921ea8eea8 [file] [log] [blame]
Derick Montaguefded0d12019-12-11 06:16:40 -06001import Axios from 'axios';
Yoshie Muranaka74c24f12019-12-03 10:45:46 -08002
Yoshie Muranaka6ce1a072019-12-06 14:13:59 -08003const api = Axios.create({
4 withCredentials: true
5});
Yoshie Muranaka74c24f12019-12-03 10:45:46 -08006
Yoshie Muranaka74c24f12019-12-03 10:45:46 -08007export default {
8 get(path) {
9 return api.get(path);
10 },
11 delete(path, payload) {
12 return api.delete(path, payload);
13 },
14 post(path, payload) {
15 return api.post(path, payload);
16 },
17 patch(path, payload) {
18 return api.patch(path, payload);
19 },
20 put(path, payload) {
21 return api.put(path, payload);
22 },
23 all(promises) {
24 return Axios.all(promises);
Yoshie Muranakadc04feb2019-12-04 08:41:22 -080025 }
Yoshie Muranaka74c24f12019-12-03 10:45:46 -080026};