summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2019-01-28 17:35:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-01-28 17:35:00 (GMT)
commit906002fed2d8136718c8dc4c38b2a77b7c104b5e (patch)
tree58f133def6ef8f3d5c217385e91398903200280a
parentbd8f2be4f5022f8136aeffe884e47c1586294a70 (diff)
version 2.3.52.3.5
-rw-r--r--ChangeLog.md4
-rw-r--r--Network/HTTP/Simple.hs8
-rw-r--r--http-conduit.cabal4
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 1884b7b..6993921 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+## 2.3.5
+
+* Adds `addToRequestQueryString` helper function
+
## 2.3.4
* Reexport RequestHeaders from Network.HTTP.Types (what was intended in last version)
diff --git a/Network/HTTP/Simple.hs b/Network/HTTP/Simple.hs
index 6fe7a99..0690d75 100644
--- a/Network/HTTP/Simple.hs
+++ b/Network/HTTP/Simple.hs
@@ -57,6 +57,7 @@ module Network.HTTP.Simple
, setRequestHeaders
, setRequestQueryString
, getRequestQueryString
+ , addToRequestQueryString
-- ** Request body
, setRequestBody
, setRequestBodyJSON
@@ -347,6 +348,13 @@ getRequestQueryString = H.parseQuery . H.queryString
setRequestQueryString :: H.Query -> H.Request -> H.Request
setRequestQueryString = H.setQueryString
+-- | Add to the existing query string parameters.
+--
+-- @since 2.3.5
+addToRequestQueryString :: H.Query -> H.Request -> H.Request
+addToRequestQueryString additions req = setRequestQueryString q req
+ where q = additions <> getRequestQueryString req
+
-- | Set the request body to the given 'H.RequestBody'. You may want to
-- consider using one of the convenience functions in the modules, e.g.
-- 'requestBodyJSON'.
diff --git a/http-conduit.cabal b/http-conduit.cabal
index 948b28b..c3d6249 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 2.3.4
+version: 2.3.5
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
@@ -29,7 +29,7 @@ library
, conduit >= 1.2
, conduit-extra >= 1.1
, http-types >= 0.7
- , http-client >= 0.5.13 && < 0.6
+ , http-client >= 0.5.13 && < 0.7
, http-client-tls >= 0.3 && < 0.4
, mtl
, unliftio-core