Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Types for possible backends to run client-side RequestF
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 #
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 runRequestAcceptStatus :: Maybe [Status] -> Request -> Free f Response Source # throwClientError :: ClientError -> Free f a Source # |
class RunClient m => RunStreamingClient m where Source #
withStreamingRequest :: Request -> (StreamingResponse -> IO a) -> m a Source #