diff --git a/HttpFs.IntegrationTests/AssemblyInfo.fs b/HttpFs.IntegrationTests/AssemblyInfo.fs index e60e11d..94e020c 100644 --- a/HttpFs.IntegrationTests/AssemblyInfo.fs +++ b/HttpFs.IntegrationTests/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs.IntegrationTests" let [] AssemblyProduct = "HttpFs.IntegrationTests" - let [] AssemblyCopyright = "Copyright © 2019" + let [] AssemblyCopyright = "Copyright © 2020" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.3.0" - let [] AssemblyFileVersion = "5.3.0" + let [] AssemblyVersion = "5.4.0" + let [] AssemblyFileVersion = "5.4.0" diff --git a/HttpFs.IntegrationTests/HttpServer.fs b/HttpFs.IntegrationTests/HttpServer.fs index f0c5610..b482601 100644 --- a/HttpFs.IntegrationTests/HttpServer.fs +++ b/HttpFs.IntegrationTests/HttpServer.fs @@ -177,7 +177,12 @@ let app = Filters.OPTIONS >=> Filters.path "/Options" >=> Successful.OK "" - Filters.DELETE >=> Filters.path "/Delete" >=> Successful.OK "" + Filters.DELETE >=> choose [ + Filters.path "/Delete" >=> Successful.OK "" + Filters.path "/DeleteWithBody" >=> request (fun r -> + recordedRequest <- Some r + Successful.OK "") + ] Filters.PUT >=> Filters.path "/Put" >=> Successful.OK "" diff --git a/HttpFs.IntegrationTests/Tests.fs b/HttpFs.IntegrationTests/Tests.fs index cabdb12..b1ea3ea 100644 --- a/HttpFs.IntegrationTests/Tests.fs +++ b/HttpFs.IntegrationTests/Tests.fs @@ -463,6 +463,17 @@ let tests = Expect.equal resp.statusCode 200 "statusCode should be equal" } + testCaseAsync "Delete method with body works" <| async { + let! resp = + Request.create Delete (uriFor "/DeleteWithBody") + |> Request.bodyString "Hi mum" + |> getResponse + |> Alt.toAsync + + let req = HttpServer.recordedRequest in + Expect.equal (req.Value |> getHeader "content-length") "6" "content-length should be equal" + } + testCaseAsync "Other method works" <| async { use! resp = Request.create (HttpMethod.Other "OTHER") (uriFor "/Other") diff --git a/HttpFs.UnitTests/AssemblyInfo.fs b/HttpFs.UnitTests/AssemblyInfo.fs index 5230ce6..eecfdf6 100644 --- a/HttpFs.UnitTests/AssemblyInfo.fs +++ b/HttpFs.UnitTests/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs.UnitTests" let [] AssemblyProduct = "HttpFs.UnitTests" - let [] AssemblyCopyright = "Copyright © 2019" + let [] AssemblyCopyright = "Copyright © 2020" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.3.0" - let [] AssemblyFileVersion = "5.3.0" + let [] AssemblyVersion = "5.4.0" + let [] AssemblyFileVersion = "5.4.0" diff --git a/HttpFs/AssemblyInfo.fs b/HttpFs/AssemblyInfo.fs index 5022eb1..d8cf7c3 100644 --- a/HttpFs/AssemblyInfo.fs +++ b/HttpFs/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs" let [] AssemblyProduct = "HttpFs" - let [] AssemblyCopyright = "Copyright © 2019" + let [] AssemblyCopyright = "Copyright © 2020" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.3.0" - let [] AssemblyFileVersion = "5.3.0" + let [] AssemblyVersion = "5.4.0" + let [] AssemblyFileVersion = "5.4.0" diff --git a/HttpFs/HttpFs.fs b/HttpFs/HttpFs.fs index be8919e..d133188 100644 --- a/HttpFs/HttpFs.fs +++ b/HttpFs/HttpFs.fs @@ -767,6 +767,7 @@ module Client = | HttpMethod.Post | HttpMethod.Put | HttpMethod.Patch + | HttpMethod.Delete | HttpMethod.Other _ -> true | _ -> false diff --git a/HttpFs/HttpFs.fsproj b/HttpFs/HttpFs.fsproj index ac66a15..89c4f28 100644 --- a/HttpFs/HttpFs.fsproj +++ b/HttpFs/HttpFs.fsproj @@ -3,7 +3,7 @@ HttpFs Http.fs - 5.3.0 + 5.4.0 netstandard2.0;net471 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3fc7945..e3498f1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,8 @@ +#### 5.4.0 — 2018-06-27 +* Delete verb now supports body +* Support for custom http method +* ContentEncoding request header + #### 5.3.0 — 2018-06-27 * Default non-specified charsets to UTF8 rather than Latin 1.