aboutsummaryrefslogtreecommitdiff
path: root/src/requests.js
blob: ad45dcf6a80ccb25ee6d336267b7efcfc734cc0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import axios from 'axios'

const baseUrl = 'https://eugvs.pythonanywhere.com/';
const baseApiUrl = baseUrl + 'api/';

export const get = (url) => {
  return axios.get(
    baseApiUrl + url,
  );
};

export const post = (url, data) => {
  return axios.post(
    baseApiUrl + url,
    data
  );
};

export const del = (url, data) => {
  return axios.delete(
    baseApiUrl + url,
    data
  )
};