aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-10 20:10:33 +0300
committereug-vs <eug-vs@keemail.me>2020-06-10 20:10:33 +0300
commit8b4f8e55962690145834866edd64d45b87b3a545 (patch)
treecde87df132c267ecff17278f617570c10ecd5f7f /src
parent9473f8836bc65d1e0ea87607def54b86d719bbc8 (diff)
downloadwhich-ui-8b4f8e55962690145834866edd64d45b87b3a545.tar.gz
feat: implement get/post functions
Diffstat (limited to 'src')
-rw-r--r--src/requests.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/requests.ts b/src/requests.ts
new file mode 100644
index 0000000..c653073
--- /dev/null
+++ b/src/requests.ts
@@ -0,0 +1,12 @@
+import axios from 'axios';
+
+const baseApiUrl = 'http://localhost:3030';
+
+export const get = (url: string) => {
+ return axios.get(baseApiUrl + url)
+};
+
+export const post = (url: string, data: object) => {
+ return axios.post(baseApiUrl + url, data);
+};
+