aboutsummaryrefslogtreecommitdiff
path: root/src/requests.js
blob: caa19e8bc1a60f7595d612740f33876c90ef7183 (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 = 'http://localhost:8000/';
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
  )
};