Safe Haskell | None |
---|---|
Language | Haskell2010 |
The primary Free Monad wrapping HTTP actions.
- type family RequestType client :: *
- type family ResponseType client :: *
- data HttpF client a = HttpF StdMethod (RequestType client) (ResponseType client -> a)
- type FreeHttp client m a = FT (HttpF client) m a
- connect :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- delete :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- get :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- head :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- options :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- patch :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- post :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- put :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
- trace :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client)
Type Families
Base Request type
type family RequestType client :: * Source
type family to represent the request type foundation
type RequestType HttpClient = Request Source | HttpClient expects |
Base REsponse type
type family ResponseType client :: * Source
type family to represent the response type foundation
Types
The base free monad type
Our functor from which the free-http free monad is generated from.
HttpF StdMethod (RequestType client) (ResponseType client -> a) |
A type alias for 'FT (HttpF client) m a'
type FreeHttp client m a = FT (HttpF client) m a Source
a type alias for the free monad generated by HttpF
smart constructors for http verbs
connect :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
delete :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
get :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
smart constructors
head :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
options :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
patch :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
post :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
put :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source
trace :: Monad m => RequestType client -> FT (HttpF client) m (ResponseType client) Source