aboutsummaryrefslogtreecommitdiff
path: root/src/requests.js
blob: 91eaf65c2fc711148db19e18e7feb02e45bb1972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
  );
};