@@ -147,9 +147,8 @@ performRequest :: Method -> Req -> Manager -> BaseUrl
147performRequest reqMethod req manager reqHost = do
147performRequest reqMethod req manager reqHost = do
148 partialRequest <- liftIO $ reqToRequest req reqHost
148 partialRequest <- liftIO $ reqToRequest req reqHost
150+ let request = disableStatusCheck $
150− let request = partialRequest { Client.method = reqMethod
151+ partialRequest { Client.method = reqMethod }
151− , checkStatus = \ _status _headers _cookies -> Nothing
154 eResponse <- liftIO $ catchConnectionError $ Client.httpLbs request manager
153 eResponse <- liftIO $ catchConnectionError $ Client.httpLbs request manager
155 case eResponse of
154 case eResponse of
@@ -170,6 +169,12 @@ performRequest reqMethod req manager reqHost = do
170 throwE $ FailureResponse status ct body
169 throwE $ FailureResponse status ct body
171 return (status_code, body, ct, hdrs, response)
170 return (status_code, body, ct, hdrs, response)
172+disableStatusCheck :: Request -> Request
173+#if MIN_VERSION_http_client(0,5,0)
174+disableStatusCheck req = req { checkResponse = \ _req _res -> return () }
176+disableStatusCheck req = req { checkStatus = \ _status _headers _cookies -> Nothing }
174performRequestCT :: MimeUnrender ct result =>
179performRequestCT :: MimeUnrender ct result =>
175 Proxy ct -> Method -> Req -> Manager -> BaseUrl
180 Proxy ct -> Method -> Req -> Manager -> BaseUrl