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