aboutsummaryrefslogtreecommitdiff
path: root/src/requests.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/requests.ts')
-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);
+};
+