@@ -147,9 +147,8 @@ performRequest :: Method -> Req -> Manager -> BaseUrl
147147performRequest reqMethod req manager reqHost = do
148148 partialRequest <- liftIO $ reqToRequest req reqHost
149149
150− let request = partialRequest { Client.method = reqMethod
151− , checkStatus = \ _status _headers _cookies -> Nothing
152− }
150+ let request = disableStatusCheck $
151+ partialRequest { Client.method = reqMethod }
153152
154153 eResponse <- liftIO $ catchConnectionError $ Client.httpLbs request manager
155154 case eResponse of
@@ -170,6 +169,12 @@ performRequest reqMethod req manager reqHost = do
170169 throwE $ FailureResponse status ct body
171170 return (status_code, body, ct, hdrs, response)
172171
172+disableStatusCheck :: Request -> Request
173+#if MIN_VERSION_http_client(0,5,0)
174+disableStatusCheck req = req { checkResponse = \ _req _res -> return () }
175+#else
176+disableStatusCheck req = req { checkStatus = \ _status _headers _cookies -> Nothing }
177+#endif
173178
174179performRequestCT :: MimeUnrender ct result =>
175180 Proxy ct -> Method -> Req -> Manager -> BaseUrl