aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index ba0d8335..595d2dd8 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -1,3 +1,10 @@
export function scroll(section) {
section.scrollIntoView({ behavior: 'smooth' });
}
+
+export const post = (url, body) =>
+ fetch(url, {
+ method: 'POST',
+ body: JSON.stringify(body),
+ headers: { 'accept': 'application/json', 'content-type': 'application/json' }
+ });