@@ -569,8 +569,8 @@ instance Default HttpConfig where
569569 , httpConfigCheckResponse = \_ response ->
570570 let statusCode = responseStatusCode response in
571571 unless (200 <= statusCode && statusCode < 300) $ do
572− chunk <- makeResponseBodyPreview response
573− let vresponse = toVanillaResponse response
572+ let chunk = makeResponseBodyPreview response
573+ vresponse = toVanillaResponse response
574574 LI.throwHttp (L.StatusCodeException (void vresponse) chunk)
575575 , httpConfigRetryPolicy = def
576576 , httpConfigRetryJudge = \_ r -> return $
@@ -1346,7 +1346,7 @@ instance HttpResponse IgnoreResponse where
13461346 toVanillaResponse (IgnoreResponse response) = response
13471347 getHttpResponse request manager =
13481348 IgnoreResponse <$> liftIO (L.httpNoBody request manager)
1349− makeResponseBodyPreview _ = return "<ignored response>"
1349+ makeResponseBodyPreview _ = "<ignored response>"
13501350
13511351-- | Use this as the fourth argument of 'req' to specify that you want it to
13521352-- return the 'IgnoreResponse' interpretation.
@@ -1375,7 +1375,7 @@ instance FromJSON a => HttpResponse (JsonResponse a) where
13751375 . L.responseBody
13761376 $ response
13771377 return $ JsonResponse response { L.responseBody = x } preview
1378− makeResponseBodyPreview (JsonResponse _ preview) = return preview
1378+ makeResponseBodyPreview (JsonResponse _ preview) = preview
13791379
13801380-- | Use this as the forth argument of 'req' to specify that you want it to
13811381-- return the 'JsonResponse' interpretation.
@@ -1394,7 +1394,7 @@ instance HttpResponse BsResponse where
13941394 L.withResponse request manager $ \response -> do
13951395 chunks <- L.brConsume (L.responseBody response)
13961396 return $ BsResponse response { L.responseBody = B.concat chunks }
1397− makeResponseBodyPreview = return . B.take bodyPreviewLength . responseBody
1397+ makeResponseBodyPreview = B.take bodyPreviewLength . responseBody
13981398
13991399-- | Use this as the forth argument of 'req' to specify that you want to
14001400-- interpret response body as a strict 'ByteString'.
@@ -1412,7 +1412,7 @@ instance HttpResponse LbsResponse where
14121412 toVanillaResponse (LbsResponse response) = response
14131413 getHttpResponse request manager =
14141414 LbsResponse <$> L.httpLbs request manager
1415− makeResponseBodyPreview = return . BL.toStrict . BL.take 1027 . responseBody
1415+ makeResponseBodyPreview = BL.toStrict . BL.take 1027 . responseBody
14161416
14171417-- | Use this as the forth argument of 'req' to specify that you want to
14181418-- interpret response body as a lazy 'BL.ByteString'.
@@ -1500,7 +1500,7 @@ class HttpResponse response where
15001500 --
15011501 -- @since 0.3.0
15021502
1503− makeResponseBodyPreview :: response -> IO ByteString
1503+ makeResponseBodyPreview :: response -> ByteString
15041504
15051505----------------------------------------------------------------------------
15061506-- Other