free-http-0.2.0: An HTTP Client based on Free Monads.

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.Client.Free.HttpClient

Description

An Interpreter with http-client as the foundation

Synopsis

Documentation

data HttpClient Source

HttpClient is an uninhabited type used to identify the http-client based interpreter

Instances

type ResponseType HttpClient = Response ByteString Source 
type RequestType HttpClient = Request Source

HttpClient expects Requests and returns 'Response ByteString's

runHttp :: (Request ~ RequestType client, Response ByteString ~ ResponseType client, Monad m, MonadIO m) => Manager -> FT (HttpF client) m a -> m a Source

The main http-client interpreter. The client is free to specify the base effect monad so long as there is an instance of MonadIO for it in scope.

runTHttp :: (Request ~ RequestType client, Response ByteString ~ ResponseType client, Monad m, MonadIO m, MonadTrans t, Monad (t m)) => Manager -> FT (HttpF client) m a -> t m a Source

The main http-client interpreter. The client is free to specify the base effect monad (m), and in thise case this the result can be lifted into a higher monad transformer stack (t)