diff options
Diffstat (limited to 'src/client/elm/Utils/Http.elm')
-rw-r--r-- | src/client/elm/Utils/Http.elm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/elm/Utils/Http.elm b/src/client/elm/Utils/Http.elm index bd6e2ac..b394af4 100644 --- a/src/client/elm/Utils/Http.elm +++ b/src/client/elm/Utils/Http.elm @@ -1,5 +1,6 @@ module Utils.Http ( post + , delete , decodeHttpValue , errorKey ) where @@ -9,8 +10,14 @@ import Task exposing (..) import Json.Decode as Json exposing (Decoder) post : String -> Task Error Value -post url = - { verb = "POST" +post = request "POST" + +delete : String -> Task Error Value +delete = request "DELETE" + +request : String -> String -> Task Error Value +request method url = + { verb = method , headers = [] , url = url , body = empty |