@@ -491,7 +491,7 @@ reqBr method url body options consume = req' method url body options $ \request
491491 (const openResponse)
492492 )
493493 )
494− (preview, r') <- grabPreview bodyPreviewLength r
494+ (preview, r') <- grabPreview httpConfigBodyPreviewLength r
495495 mapM_ LI.throwHttp (httpConfigCheckResponse request r' preview)
496496 consume r'
497497 )
@@ -671,7 +671,11 @@ data HttpConfig = HttpConfig
671671 -- retry requests that resulted in an exception.
672672 --
673673 -- @since 3.4.0
674− httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool
674+ httpConfigRetryJudgeException :: RetryStatus -> SomeException -> Bool,
675+ -- | Max length of preview fragment of response body.
676+ --
677+ -- @since 3.6.0
678+ httpConfigBodyPreviewLength :: forall a. Num a => a
675679 }
676680 deriving (Typeable)
677681
@@ -698,7 +702,8 @@ defaultHttpConfig =
698702 598, -- (Informal convention) Network read timeout error
699703 599 -- (Informal convention) Network connect timeout error
700704 ],
701− httpConfigRetryJudgeException = \_ _ -> False
705+ httpConfigRetryJudgeException = \_ _ -> False,
706+ httpConfigBodyPreviewLength = 1024
702707 }
703708 where
704709 statusCode = Y.statusCode . L.responseStatus
@@ -1843,10 +1848,3 @@ data Scheme
18431848 | -- | HTTPS
18441849 Https
18451850 deriving (Eq, Ord, Show, Data, Typeable, Generic, TH.Lift)
1846−
1847−----------------------------------------------------------------------------
1848−-- Constants
1849−
1850−-- | Max length of preview fragment of response body.
1851−bodyPreviewLength :: Num a => a
1852−bodyPreviewLength = 1024