| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hreq.Conduit.Internal.HTTP
Description
This module provides functionality for running the Hreq monad as a Streaming HTTP client and necessary
class instances.
Synopsis
- newtype Hreq m a = Hreq {
- runHreq' :: ReaderT HttpConfig m a
- newtype ResBodyStream = ResBodyStream StreamConduit
- type RunConduitClient m = RunStreamingClient m ResBodyStream
- class Monad m => RunClient (m :: Type -> Type)
- runHreq :: MonadIO m => BaseUrl -> Hreq m a -> m a
- runHreqWithConfig :: HttpConfig -> Hreq m a -> m a
- createDefConfig :: BaseUrl -> IO HttpConfig
- hreqWithConduit :: forall api ts v m. HasStreamingClient api ResBodyStream ts v m => HttpInput ts -> (StreamConduit -> IO ()) -> m ()
Documentation
Constructors
| Hreq | |
Fields
| |
Instances
| MonadTrans Hreq Source # | |
Defined in Hreq.Conduit.Internal.HTTP | |
| Monad m => MonadReader HttpConfig (Hreq m) Source # | |
Defined in Hreq.Conduit.Internal.HTTP Methods ask :: Hreq m HttpConfig # local :: (HttpConfig -> HttpConfig) -> Hreq m a -> Hreq m a # reader :: (HttpConfig -> a) -> Hreq m a # | |
| Monad m => Monad (Hreq m) Source # | |
| Functor m => Functor (Hreq m) Source # | |
| Applicative m => Applicative (Hreq m) Source # | |
| MonadIO m => MonadIO (Hreq m) Source # | |
Defined in Hreq.Conduit.Internal.HTTP | |
| MonadUnliftIO m => MonadUnliftIO (Hreq m) Source # | |
Defined in Hreq.Conduit.Internal.HTTP | |
| RunClient (Hreq IO) Source # | |
Defined in Hreq.Conduit.Internal.HTTP Methods runClient :: Request -> Hreq IO Response throwHttpError :: ClientError -> Hreq IO a checkResponse :: Request -> Response -> Hreq IO (Maybe ClientError) | |
| RunStreamingClient (Hreq IO) ResBodyStream Source # | |
Defined in Hreq.Conduit.Internal.HTTP Methods withStreamingClient :: Request -> (ResBodyStream -> IO r) -> Hreq IO r | |
newtype ResBodyStream Source #
Constructors
| ResBodyStream StreamConduit |
Instances
| RunStreamingClient (Hreq IO) ResBodyStream Source # | |
Defined in Hreq.Conduit.Internal.HTTP Methods withStreamingClient :: Request -> (ResBodyStream -> IO r) -> Hreq IO r | |
type RunConduitClient m = RunStreamingClient m ResBodyStream Source #
class Monad m => RunClient (m :: Type -> Type) #
Minimal complete definition
runClient, throwHttpError, checkResponse
Instances
| RunClient (Hreq IO) | |
Defined in Hreq.Client.Internal.HTTP Methods runClient :: Request -> Hreq IO Response throwHttpError :: ClientError -> Hreq IO a checkResponse :: Request -> Response -> Hreq IO (Maybe ClientError) | |
| RunClient (Hreq IO) Source # | |
Defined in Hreq.Conduit.Internal.HTTP Methods runClient :: Request -> Hreq IO Response throwHttpError :: ClientError -> Hreq IO a checkResponse :: Request -> Response -> Hreq IO (Maybe ClientError) | |
Run Hreq client
runHreqWithConfig :: HttpConfig -> Hreq m a -> m a Source #
createDefConfig :: BaseUrl -> IO HttpConfig #
Create Streaming Hreq Client
hreqWithConduit :: forall api ts v m. HasStreamingClient api ResBodyStream ts v m => HttpInput ts -> (StreamConduit -> IO ()) -> m () Source #
Streaming HTTP response with Conduit.
The required constraints are represented by the HasStreamingClient constraint.