blob: 0242ed511940dee01e9c359b008207c1f6b9c621 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import axios, { AxiosResponse } from 'axios';
const baseUrl = 'https://eugvs.pythonanywhere.com/';
const baseApiUrl = baseUrl + 'api/';
export const get = (url: string): Promise<AxiosResponse> => axios.get(baseApiUrl + url);
export const del = (url: string): Promise<AxiosResponse> => axios.delete(baseApiUrl + url);
export const post = (url: string, data: object): Promise<AxiosResponse> => axios.post(baseApiUrl + url, data);
|