Copyright | Aaron Taylor 2016 |
---|---|
License | MIT |
Maintainer | aaron@hamsterdam.co |
Safe Haskell | None |
Language | Haskell2010 |
Control.Monad.Http
Contents
Description
Class, instances and transformer for monads capable of HTTP requests.
In some cases, it is useful to generalize this capability. For example, it can be used provide mock responses for testing.
Class
class Monad m => MonadHttp m where #
The class of monads capable of HTTP requests.
Minimal complete definition
Methods
performRequest :: Request -> m (Response ByteString) #
Transformer
An HTTP transformer monad parameterized by an inner monad m
.
Constructors
HttpT | |
Fields
|
Instances
MonadTrans HttpT # | |
MonadError e m => MonadError e (HttpT m) # | |
Monad m => Monad (HttpT m) # | |
Functor m => Functor (HttpT m) # | |
Applicative m => Applicative (HttpT m) # | |
MonadIO m => MonadIO (HttpT m) # | |
MonadThrow m => MonadThrow (HttpT m) # | |
MonadCatch m => MonadCatch (HttpT m) # | |
MonadThrow m => MonadHttp (HttpT m) # | |
Monad m => MonadReader (Response ByteString) (HttpT m) # | |
Arguments
:: HttpT m a | The HTTP monad transformer |
-> Response ByteString | The response |
-> m a | The resulting inner monad |
Run an HTTP monad action and extract the inner monad.