Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ServantError
- = FailureResponse { }
- | DecodeFailure { }
- | UnsupportedContentType { }
- | InvalidContentTypeHeader { }
- | ConnectionError { }
- data Req = Req {}
- defReq :: Req
- appendToPath :: String -> Req -> Req
- appendToQueryString :: Text -> Maybe Text -> Req -> Req
- addHeader :: ToHttpApiData a => String -> a -> Req -> Req
- setRQBody :: ByteString -> MediaType -> Req -> Req
- reqToRequest :: (Functor m, MonadThrow m) => Req -> BaseUrl -> m Request
- displayHttpRequest :: Method -> String
- type ClientM = ExceptT ServantError IO
- performRequest :: Method -> Req -> Manager -> BaseUrl -> ClientM (Int, ByteString, MediaType, [Header], Response ByteString)
- performRequestCT :: MimeUnrender ct result => Proxy ct -> Method -> Req -> Manager -> BaseUrl -> ClientM ([Header], result)
- performRequestNoBody :: Method -> Req -> Manager -> BaseUrl -> ClientM [Header]
- catchConnectionError :: IO a -> IO (Either ServantError a)
Documentation
data ServantError Source
appendToPath :: String -> Req -> Req Source
reqToRequest :: (Functor m, MonadThrow m) => Req -> BaseUrl -> m Request Source
performing requests
displayHttpRequest :: Method -> String Source
type ClientM = ExceptT ServantError IO Source
performRequest :: Method -> Req -> Manager -> BaseUrl -> ClientM (Int, ByteString, MediaType, [Header], Response ByteString) Source
performRequestCT :: MimeUnrender ct result => Proxy ct -> Method -> Req -> Manager -> BaseUrl -> ClientM ([Header], result) Source
catchConnectionError :: IO a -> IO (Either ServantError a) Source