servant-client: fix compilation when building with http-client < 0.4.30

This commit is contained in:
Sönke Hahn 2016-08-14 20:13:46 +02:00
parent 490502cad1
commit b1f143010e

View file

@ -138,7 +138,7 @@ reqToRequest req (BaseUrl reqScheme reqHost reqPort path) =
-- http://hackage.haskell.org/package/http-client-0.4.30/docs/src/Network-HTTP-Client-Request.html#parseRequest
-- http://hackage.haskell.org/package/http-client-0.5.0/docs/src/Network-HTTP-Client-Request.html#parseRequest
parseRequest :: MonadThrow m => String -> m Request
parseRequest url = disableStatusCheck <$> parseUrl url
parseRequest url = liftM disableStatusCheck (parseUrl url)
where
disableStatusCheck req = req { checkStatus = \ _status _headers _cookies -> Nothing }
#endif