about summary refs log tree commit diff
path: root/client/src/Utils.elm
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/Utils.elm')
-rw-r--r--client/src/Utils.elm18
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/Utils.elm b/client/src/Utils.elm
index 28f15fb5c101..60343cd87018 100644
--- a/client/src/Utils.elm
+++ b/client/src/Utils.elm
@@ -77,6 +77,24 @@ deleteWithCredentials { url, body, expect } =
         , expect = expect
         }
 
+putWithCredentials :
+    { url : String
+    , body : Http.Body
+    , expect : Http.Expect msg
+    }
+    -> Cmd msg
+putWithCredentials { url, body, expect } =
+    Http.riskyRequest
+        { url = url
+        , headers = [ Http.header "Origin" Shared.clientOrigin ]
+        , method = "PUT"
+        , timeout = Nothing
+        , tracker = Nothing
+        , body = body
+        , expect = expect
+        }
+
+
 
 formatTime : Time.Posix -> String
 formatTime ts =