blob: da6f398219de2b3902b52f934eefe7d3906a62b0 [file] [log] [blame]
import Axios from 'axios';
const api = Axios.create({
withCredentials: true
});
// TODO: Permanent authentication solution
// Using defaults to set auth for sending
// auth object in header
export default {
get(path) {
return api.get(path);
},
delete(path, payload) {
return api.delete(path, payload);
},
post(path, payload) {
return api.post(path, payload);
},
patch(path, payload) {
return api.patch(path, payload);
},
put(path, payload) {
return api.put(path, payload);
},
all(promises) {
return Axios.all(promises);
},
defaults: api.defaults
};