Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant.Client.Core.RunClient
Description
Types for possible backends to run client-side
Request
queries
Synopsis
-
class
Monad
m =>
RunClient
m
where
- runRequestAcceptStatus :: Maybe [ Status ] -> Request -> m Response
- throwClientError :: ClientError -> m a
- runRequest :: RunClient m => Request -> m Response
-
class
RunClient
m =>
RunStreamingClient
m
where
- withStreamingRequest :: Request -> ( StreamingResponse -> IO a) -> m a
-
data
ClientF
a
- = RunRequest Request ( Response -> a)
- | Throw ClientError
Documentation
class Monad m => RunClient m where Source #
Methods
runRequestAcceptStatus :: Maybe [ Status ] -> Request -> m Response Source #
How to make a request, with an optional list of status codes to not throw exceptions for (default: [200..299]).
throwClientError :: ClientError -> m a Source #
Instances
ClientF ~ f => RunClient ( Free f) Source # | |
Defined in Servant.Client.Core.RunClient Methods runRequestAcceptStatus :: Maybe [ Status ] -> Request -> Free f Response Source # throwClientError :: ClientError -> Free f a Source # |
class RunClient m => RunStreamingClient m where Source #
Methods
withStreamingRequest :: Request -> ( StreamingResponse -> IO a) -> m a Source #
Constructors
RunRequest Request ( Response -> a) | |
Throw ClientError |