packages feed

http-conduit 2.1.3 → 2.1.4

raw patch · 3 files changed

+21/−2 lines, 3 filesdep ~http-client

Dependency ranges changed: http-client

Files

Network/HTTP/Conduit.hs view
@@ -150,6 +150,7 @@     , responseTimeout     , cookieJar     , getConnectionWrapper+    , HCC.setQueryString       -- *** Request body     , requestBodySource     , requestBodySourceChunked
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         2.1.3+version:         2.1.4 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -29,7 +29,7 @@                  , conduit               >= 0.5.5   && < 1.2                  , http-types            >= 0.7                  , lifted-base           >= 0.1-                 , http-client           >= 0.3.5   && < 0.4+                 , http-client           >= 0.3.6   && < 0.4                  , http-client-tls       >= 0.2.2                  , monad-control                  , mtl
test/main.hs view
@@ -434,6 +434,24 @@                     isDate _ = False                 liftIO $ f res2 `shouldBe` f res1 +    it "setQueryString" $ do+        ref <- I.newIORef undefined+        let app' req = do+                I.writeIORef ref $ Wai.queryString req+                return $ responseLBS status200 [] ""+        withApp app' $ \port -> do+            let qs =+                    [ ("foo", Just "bar")+                    , (TE.encodeUtf8 "שלום", Just "hola")+                    , ("noval", Nothing)+                    ]+            withManager $ \man -> do+                req <- parseUrl $ "http://localhost:" ++ show port+                _ <- httpLbs (setQueryString qs req) man+                return ()+            res <- I.readIORef ref+            res `shouldBe` qs+ withCApp :: (Data.Conduit.Network.AppData -> IO ()) -> (Int -> IO ()) -> IO () withCApp app' f = do     port <- getPort