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

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.Client.Free

Contents

Description

The primary Free Monad wrapping HTTP actions.

Synopsis

Type Families

Base Request type

type family RequestType client :: * Source

type family to represent the request type foundation

Instances

type RequestType HttpClient = Request Source

HttpClient expects Requests and returns 'Response ByteString's

Base Response type

type family ResponseType client :: * Source

type family to represent the response type foundation

Types

The base functor from which our free monad is generated.

data HttpF client a Source

Our functor from which the free-http free monad is generated from.

Constructors

HttpF StdMethod (RequestType client) (ResponseType client -> a) 

Instances

Functor (HttpF client) Source 

A helpful type alias

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

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