summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelSnoyman <>2018-04-10 08:14:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-04-10 08:14:00 (GMT)
commit72f5eafa149b627dcc850f3d7e7dfa5a24689abd (patch)
tree086475e4c5ec8d348b0cf96229c6109be3fb2448
parent54941b227a01db140b75115a4a220af093566556 (diff)
version 2.3.12.3.1
-rw-r--r--ChangeLog.md5
-rw-r--r--Network/HTTP/Client/Conduit.hs5
-rw-r--r--Network/HTTP/Conduit.hs10
-rw-r--r--Network/HTTP/Simple.hs5
-rw-r--r--http-conduit.cabal2
5 files changed, 15 insertions, 12 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index ba19222..3f0d018 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,8 @@
+## 2.3.1
+
+* Reexport Query from Network.HTTP.Types
+* Rewrite a type signatures of getRequestQueryString and setRequestQueryString with Query
+
## 2.3.0
* conduit 1.3 support
diff --git a/Network/HTTP/Client/Conduit.hs b/Network/HTTP/Client/Conduit.hs
index 1aca0a5..48e944a 100644
--- a/Network/HTTP/Client/Conduit.hs
+++ b/Network/HTTP/Client/Conduit.hs
@@ -1,6 +1,5 @@
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE RankNTypes #-}
-- | A new, experimental API to replace "Network.HTTP.Conduit".
--
-- For most users, "Network.HTTP.Simple" is probably a better choice. For more
diff --git a/Network/HTTP/Conduit.hs b/Network/HTTP/Conduit.hs
index 34f46f9..76c592b 100644
--- a/Network/HTTP/Conduit.hs
+++ b/Network/HTTP/Conduit.hs
@@ -1,7 +1,5 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE OverloadedStrings #-}
-- |
--
-- = Simpler API
@@ -31,7 +29,7 @@
--
-- > import Data.Conduit.Binary (sinkFile) -- Exported from the package conduit-extra
-- > import Network.HTTP.Conduit
--- > import qualified Data.Conduit as C
+-- > import Conduit (runConduit, (.|))
-- > import Control.Monad.Trans.Resource (runResourceT)
-- >
-- > main :: IO ()
@@ -40,7 +38,7 @@
-- > manager <- newManager tlsManagerSettings
-- > runResourceT $ do
-- > response <- http request manager
--- > responseBody response C.$$+- sinkFile "google.html"
+-- > runConduit $ responseBody response .| sinkFile "google.html"
--
-- The following headers are automatically set by this module, and should not
-- be added to 'requestHeaders':
diff --git a/Network/HTTP/Simple.hs b/Network/HTTP/Simple.hs
index 18789a7..8099a4d 100644
--- a/Network/HTTP/Simple.hs
+++ b/Network/HTTP/Simple.hs
@@ -28,6 +28,7 @@ module Network.HTTP.Simple
, httpSource
, withResponse
-- * Types
+ , H.Query
, H.Request
, H.Response
, JSONException (..)
@@ -311,13 +312,13 @@ setRequestHeaders x req = req { H.requestHeaders = x }
-- | Get the query string parameters
--
-- @since 2.1.10
-getRequestQueryString :: H.Request -> [(S.ByteString, Maybe S.ByteString)]
+getRequestQueryString :: H.Request -> H.Query
getRequestQueryString = H.parseQuery . H.queryString
-- | Set the query string parameters
--
-- @since 2.1.10
-setRequestQueryString :: [(S.ByteString, Maybe S.ByteString)] -> H.Request -> H.Request
+setRequestQueryString :: H.Query -> H.Request -> H.Request
setRequestQueryString = H.setQueryString
-- | Set the request body to the given 'H.RequestBody'. You may want to
diff --git a/http-conduit.cabal b/http-conduit.cabal
index c9f42ac..cf5652a 100644
--- a/http-conduit.cabal
+++ b/http-conduit.cabal
@@ -1,5 +1,5 @@
name: http-conduit
-version: 2.3.0
+version: 2.3.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>