req 3.7.0 → 3.8.0
raw patch · 3 files changed
+17/−3 lines, 3 filesdep ~bytestring
Dependency ranges changed: bytestring
Files
- CHANGELOG.md +5/−0
- Network/HTTP/Req.hs +11/−2
- req.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,8 @@+## Req 3.8.0++* Adjusted the value of the `httpConfigRetryJudgeException` field of+ `defaultHttpConfig` to retry on response timeouts and connection timeouts.+ ## Req 3.7.0 * Added `reqCb`, a function that allows you to modify the `Request` object
Network/HTTP/Req.hs view
@@ -716,7 +716,9 @@ -- @since 0.3.0 httpConfigRetryJudge :: forall b. RetryStatus -> L.Response b -> Bool, -- | Similar to 'httpConfigRetryJudge', but is used to decide when to- -- retry requests that resulted in an exception.+ -- retry requests that resulted in an exception. By default it retries+ -- on response timeout and connection timeout (changed in version+ -- /3.8.0/). -- -- @since 3.4.0 httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool,@@ -750,7 +752,14 @@ 598, -- (Informal convention) Network read timeout error 599 -- (Informal convention) Network connect timeout error ],- httpConfigRetryJudgeException = \_ _ -> False,+ httpConfigRetryJudgeException = \_ e ->+ case fromException e of+ Just (L.HttpExceptionRequest _ c) ->+ case c of+ L.ResponseTimeout -> True+ L.ConnectionTimeout -> True+ _ -> False+ _ -> False, httpConfigBodyPreviewLength = 1024 } where
req.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: req-version: 3.7.0+version: 3.8.0 license: BSD3 license-file: LICENSE.md maintainer: Mark Karpov <markkarpov92@gmail.com>