packages feed

http-conduit 2.1.10.1 → 2.1.11

raw patch · 4 files changed

+21/−35 lines, 4 filesdep ~http-clientPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: http-client

API changes (from Hackage documentation)

+ Network.HTTP.Conduit: defaultRequest :: Request
+ Network.HTTP.Conduit: parseRequest :: MonadThrow m => String -> m Request
+ Network.HTTP.Conduit: parseRequest_ :: String -> Request
+ Network.HTTP.Conduit: parseUrlThrow :: MonadThrow m => String -> m Request
+ Network.HTTP.Simple: parseRequest_ :: String -> Request

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 2.1.11++* Switch to non-throwing behavior in `Network.HTTP.Simple` [#193](https://github.com/snoyberg/http-client/issues/193)+ ## 2.1.10.1  * Fix mistaken `@since` comments
Network/HTTP/Conduit.hs view
@@ -36,7 +36,7 @@ -- > -- > main :: IO () -- > main = do--- >      request <- parseUrl "http://google.com/"+-- >      request <- parseRequest "http://google.com/" -- >      manager <- newManager tlsManagerSettings -- >      runResourceT $ do -- >          response <- http request manager@@ -88,7 +88,7 @@ -- >                 } -- > -- > main = withSocketsDo $ do--- >      request' <- parseUrl "http://example.com/secret-page"+-- >      request' <- parseRequest "http://example.com/secret-page" -- >      manager <- newManager tlsManagerSettings -- >      let request = request' { cookieJar = Just $ createCookieJar [cookie] } -- >      (fmap Just (httpLbs request manager)) `E.catch`@@ -121,7 +121,7 @@ -- > -- > main :: IO () -- > main = withSocketsDo $ do--- >      request' <- parseUrl "http://www.yesodweb.com/does-not-exist"+-- >      request' <- parseRequest "http://www.yesodweb.com/does-not-exist" -- >      let request = request' { checkStatus = \_ _ _ -> Nothing } -- >      manager <- newManager tlsManagerSettings -- >      res <- httpLbs request manager@@ -137,7 +137,7 @@ -- > -- > main :: IO () -- > main = do--- >     request <- parseUrl "https://github.com/"+-- >     request <- parseRequest "https://github.com/" -- >     let settings = mkManagerSettings (TLSSettingsSimple True False False) Nothing -- >     manager <- newManager settings -- >     res <- httpLbs request manager@@ -208,6 +208,10 @@     , destroyCookieJar       -- * Utility functions     , parseUrl+    , parseUrlThrow+    , parseRequest+    , parseRequest_+    , defaultRequest     , applyBasicAuth     , addProxy     , lbsResponse@@ -243,7 +247,8 @@                                                closeManager, managerConnCount,                                                managerResponseTimeout,                                                managerTlsConnection, newManager)-import           Network.HTTP.Client          (parseUrl, urlEncodedBody, applyBasicAuth)+import           Network.HTTP.Client          (parseUrl, parseUrlThrow, urlEncodedBody, applyBasicAuth,+                                               defaultRequest, parseRequest, parseRequest_) import           Network.HTTP.Client.Internal (addProxy, alwaysDecompress,                                                browserDecompress) import           Network.HTTP.Client.Internal (getRedirectedRequest)@@ -284,7 +289,7 @@ -- -- This function will 'throwIO' an 'HttpException' for any -- response with a non-2xx status code (besides 3xx redirects up--- to a limit of 10 redirects). It uses 'parseUrl' to parse the+-- to a limit of 10 redirects). It uses 'parseUrlThrow' to parse the -- input. This function essentially wraps 'httpLbs'. -- -- Note: Even though this function returns a lazy bytestring, it@@ -297,7 +302,7 @@ simpleHttp :: MonadIO m => String -> m L.ByteString simpleHttp url = liftIO $ do     man <- newManager tlsManagerSettings-    req <- liftIO $ parseUrl url+    req <- liftIO $ parseUrlThrow url     responseBody <$> httpLbs (setConnectionClose req) man  conduitManagerSettings :: ManagerSettings
Network/HTTP/Simple.hs view
@@ -30,8 +30,9 @@     , H.HttpException (..)     , H.Proxy (..)       -- * Request constructions-    , defaultRequest-    , parseRequest+    , H.defaultRequest+    , H.parseRequest+    , H.parseRequest_       -- * Request lenses       -- ** Basics     , setRequestMethod@@ -134,30 +135,6 @@     | JSONConversionException H.Request (H.Response Value) String   deriving (Show, Typeable) instance Exception JSONException---- | The default request value. You'll almost certainly want to set the--- 'requestHost', and likely the 'requestPath' as well.------ See also 'parseRequest'------ @since 2.1.10-defaultRequest :: H.Request-defaultRequest = def---- | Parse a 'H.Request' from a 'String'. This is given as a URL, with an--- optional leading request method, e.g.:------ * @http://example.com@--- * @https://example.com:1234/foo/bar?baz=bin@--- * @PUT http://example.com/some-resource@------ If parsing fails, 'Catch.throwM' will be called. The behavior of this--- function is also used for the @IsString@ instance for use with--- @OverloadedStrings@.------ @since 2.1.10-parseRequest :: Catch.MonadThrow m => String -> m H.Request-parseRequest = H.parseUrl  -- | Perform an HTTP request and consume the body with the given 'C.Sink' --
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         2.1.10.1+version:         2.1.11 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -30,7 +30,7 @@                  , conduit-extra         >= 1.1.5                  , http-types            >= 0.7                  , lifted-base           >= 0.1-                 , http-client           >= 0.4.28  && < 0.5+                 , http-client           >= 0.4.30  && < 0.5                  , http-client-tls       >= 0.2.4                  , monad-control                  , mtl