xref: /openbmc/webui-vue/src/store/api.js (revision f65ee346)
1import Axios from 'axios';
2
3const api = Axios.create({
4  withCredentials: true
5});
6
7export 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);
25  }
26};
27