aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/requests.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/requests.py')
-rw-r--r--gn2/wqflask/requests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gn2/wqflask/requests.py b/gn2/wqflask/requests.py
index 43c8001f..182201a5 100644
--- a/gn2/wqflask/requests.py
+++ b/gn2/wqflask/requests.py
@@ -14,3 +14,13 @@ def get(url, params=None, **kwargs) -> Either:
def post(url, data=None, json=None, **kwargs) -> Either:
"""Wrap requests post method with Either monad"""
return __wrap_response__(requests.post(url, data=data, json=json, **kwargs))
+
+
+def put(url, data=None, json=None, **kwargs) -> Either:
+ """Wrap requests put method with Either monad"""
+ return __wrap_response__(requests.put(url, data=data, json=json, **kwargs))
+
+
+def delete(url, **kwargs) -> Either:
+ """Wrap requests delete method with Either monad"""
+ return __wrap_response__(requests.delete(url, **kwargs))