@@ -491,7 +491,7 @@ reqBr method url body options consume = req' method url body options $ \request
491 (const openResponse)
491 (const openResponse)
494− (preview, r') <- grabPreview bodyPreviewLength r
494+ (preview, r') <- grabPreview httpConfigBodyPreviewLength r
495 mapM_ LI.throwHttp (httpConfigCheckResponse request r' preview)
495 mapM_ LI.throwHttp (httpConfigCheckResponse request r' preview)
496 consume r'
496 consume r'
@@ -671,7 +671,11 @@ data HttpConfig = HttpConfig
671 -- retry requests that resulted in an exception.
671 -- retry requests that resulted in an exception.
673 -- @since 3.4.0
673 -- @since 3.4.0
674− httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool
674+ httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool,
675+ -- | Max length of preview fragment of response body.
678+ httpConfigBodyPreviewLength :: forall a. Num a => a
676 deriving (Typeable)
680 deriving (Typeable)
@@ -698,7 +702,8 @@ defaultHttpConfig =
698 598, -- (Informal convention) Network read timeout error
702 598, -- (Informal convention) Network read timeout error
699 599 -- (Informal convention) Network connect timeout error
703 599 -- (Informal convention) Network connect timeout error
701− httpConfigRetryJudgeException = \_ _ -> False
705+ httpConfigRetryJudgeException = \_ _ -> False,
706+ httpConfigBodyPreviewLength = 1024
704 statusCode = Y.statusCode . L.responseStatus
709 statusCode = Y.statusCode . L.responseStatus
@@ -1843,10 +1848,3 @@ data Scheme
1843 | -- | HTTPS
1848 | -- | HTTPS
1845 deriving (Eq, Ord, Show, Data, Typeable, Generic, TH.Lift)
1850 deriving (Eq, Ord, Show, Data, Typeable, Generic, TH.Lift)
1847−----------------------------------------------------------------------------
1850−-- | Max length of preview fragment of response body.
1851−bodyPreviewLength :: Num a => a
1852−bodyPreviewLength = 1024