diff --git a/elm-package.json b/elm-package.json index 0070b91..33dbe57 100644 --- a/elm-package.json +++ b/elm-package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.1.0", "summary": "Extra functions for more easily building and handling Http requests", "repository": "https://github.com/lukewestby/elm-http-builder.git", "license": "MIT", diff --git a/src/HttpBuilder.elm b/src/HttpBuilder.elm index 246f845..764b60b 100644 --- a/src/HttpBuilder.elm +++ b/src/HttpBuilder.elm @@ -7,6 +7,9 @@ module HttpBuilder , put , patch , delete + , options + , trace + , head , withHeader , withHeaders , withBody @@ -193,6 +196,33 @@ delete = requestWithVerbAndUrl "DELETE" +{-| Start building a OPTIONS request with a given URL + + options "https://example.com/api/items/1" +-} +options : String -> RequestBuilder +options = + requestWithVerbAndUrl "OPTIONS" + + +{-| Start building a TRACE request with a given URL + + trace "https://example.com/api/items/1" +-} +trace : String -> RequestBuilder +trace = + requestWithVerbAndUrl "TRACE" + + +{-| Start building a HEAD request with a given URL + + head "https://example.com/api/items/1" +-} +head : String -> RequestBuilder +head = + requestWithVerbAndUrl "HEAD" + + {-| Add a single header to a request get "https://example.com/api/items/1"