packages feed

http-types 0.5.1 → 0.5.2

raw patch · 2 files changed

+27/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Network.HTTP.Types: parseQueryText :: ByteString -> QueryText
+ Network.HTTP.Types: queryTextToQuery :: QueryText -> Query
+ Network.HTTP.Types: queryToQueryText :: Query -> QueryText
+ Network.HTTP.Types: renderQueryText :: Bool -> QueryText -> AsciiBuilder
+ Network.HTTP.Types: type QueryText = [(Text, Maybe Text)]

Files

Network/HTTP/Types.hs view
@@ -56,6 +56,12 @@ , renderSimpleQuery , parseQuery , parseSimpleQuery+  -- ** Text query string (UTF8 encoded)+, QueryText+, queryTextToQuery+, queryToQueryText+, renderQueryText+, parseQueryText   -- * Path segments , encodePathSegments , decodePathSegments@@ -69,7 +75,7 @@ ) where -import           Control.Arrow            (second, (|||))+import           Control.Arrow            (second, (|||), (***)) import           Data.Array import           Data.Bits                (shiftL, (.|.)) import           Data.Char@@ -261,6 +267,25 @@ -- General form: a=b&c=d, but if the value is Nothing, it becomes -- a&c=d. type Query = [QueryItem]++type QueryText = [(Text, Maybe Text)]++queryTextToQuery :: QueryText -> Query+queryTextToQuery = map $ encodeUtf8 *** fmap encodeUtf8++renderQueryText :: Bool -- ^ prepend a question mark?+                -> QueryText+                -> A.AsciiBuilder+renderQueryText b = renderQueryBuilder b . queryTextToQuery++queryToQueryText :: Query -> QueryText+queryToQueryText =+    map $ go *** fmap go+  where+    go = decodeUtf8With lenientDecode++parseQueryText :: B.ByteString -> QueryText+parseQueryText = queryToQueryText . parseQuery  -- | Simplified Query item type without support for parameter-less items. type SimpleQueryItem = (B.ByteString, B.ByteString)
http-types.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.5.1+Version:             0.5.2  -- A short (one-line) description of the package. Synopsis:            Generic HTTP types for Haskell (for both client and server code).