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

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.Client.Free.PureClient

Description

A pure interepreter

Synopsis

Documentation

runHttp Source

Arguments

:: Monad m 
=> (RequestType client -> ResponseType client) 
-> ignore

a parameter that will be ignored. It is included so client's can hot-swap interpreters (many will require a Manager type)

-> FT (HttpF client) m a 
-> m a 

A pure interpreter based on a client-supplied mocking function

runTHttp Source

Arguments

:: (Monad m, MonadTrans t, Monad (t m)) 
=> (RequestType client -> ResponseType client) 
-> ignore

a paramter that will be ignored. It is included so client's can host-swap interpreters (many will require a Manager type)

-> FT (HttpF client) m a 
-> t m a 

A pure interpreter based on a client-supplied mocking function. The under- lying monad is `t m`, so computations will be lifted into `t m`.