blob: 961d8d6e942dc101d7af00feb90f326ac88b6e1a (
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, { AxiosResponse } from 'axios';
const baseUrl = 'https://eugvs.pythonanywhere.com/';
const baseApiUrl = baseUrl + 'api/';
export const get = (url: string): Promise<AxiosResponse> => {
return axios.get(
baseApiUrl + url,
);
};
export const post = (url: string, data: object): Promise<AxiosResponse> => {
return axios.post(
baseApiUrl + url,
data
);
};
export const del = (url: string, data: object): Promise<AxiosResponse> => {
return axios.delete(
baseApiUrl + url,
data
)
};
|