summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2016-09-20 16:19:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2016-09-20 16:19:00 (GMT)
commit5042140efa408e468eb83b7b8410292eb7b5a5b5 (patch)
tree20a425d4111988a808bc4982ac2333118bbbfa6b
parent19b7e1319bbf7e94d14a13c7a56cf4716f9f7e19 (diff)
version 2.2.2.12.2.2.1
-rw-r--r--ChangeLog.md5
-rw-r--r--Network/HTTP/Simple.hs2
-rw-r--r--http-conduit.cabal2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index b153370..2a474e0 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,8 @@
+## 2.2.2.1
+
+* setRequestBodyJSON works with aeson's toEncoding function (>= 0.11)
+ [#230](https://github.com/snoyberg/http-client/pull/230)
+
## 2.2.2
* Add `httpNoBody` to `Network.HTTP.Simple`
diff --git a/Network/HTTP/Simple.hs b/Network/HTTP/Simple.hs
index 0d4dade..97a0a5e 100644
--- a/Network/HTTP/Simple.hs
+++ b/Network/HTTP/Simple.hs
@@ -303,7 +303,7 @@ setRequestBodyJSON x req =
req { H.requestHeaders
= (H.hContentType, "application/json; charset=utf-8")
: filter (\(y, _) -> y /= H.hContentType) (H.requestHeaders req)
- , H.requestBody = H.RequestBodyLBS $ A.encode $ A.toJSON x
+ , H.requestBody = H.RequestBodyLBS $ A.encode x
}
-- | Set the request body as a lazy @ByteString@
diff --git a/http-conduit.cabal b/http-conduit.cabal
index 79b85f1..935f50e 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 2.2.2
+version: 2.2.2.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>