hreq-core-0.1.0.0: Core functionality for Hreq Http client library

Safe HaskellNone
LanguageHaskell2010

Hreq.Core.Client.RunClient

Contents

Description

The RunClient module provides a class which any client must instantiate in order to run HTTP requests.

Synopsis

Documentation

class Monad m => RunClient m where Source #

Provides the capability to run a request and get a response.

class Monad m => RunStreamingClient m a where Source #

Methods

withStreamingClient :: forall r. Request -> (a -> IO r) -> m r Source #

Pure client

data ClientPure (state :: k) a Source #

A pure HTTP client monad useful for testing.

Instances
Monad (ClientPure state) Source # 
Instance details

Defined in Hreq.Core.Client.RunClient

Methods

(>>=) :: ClientPure state a -> (a -> ClientPure state b) -> ClientPure state b #

(>>) :: ClientPure state a -> ClientPure state b -> ClientPure state b #

return :: a -> ClientPure state a #

fail :: String -> ClientPure state a #

Functor (ClientPure state) Source # 
Instance details

Defined in Hreq.Core.Client.RunClient

Methods

fmap :: (a -> b) -> ClientPure state a -> ClientPure state b #

(<$) :: a -> ClientPure state b -> ClientPure state a #

Applicative (ClientPure state) Source # 
Instance details

Defined in Hreq.Core.Client.RunClient

Methods

pure :: a -> ClientPure state a #

(<*>) :: ClientPure state (a -> b) -> ClientPure state a -> ClientPure state b #

liftA2 :: (a -> b -> c) -> ClientPure state a -> ClientPure state b -> ClientPure state c #

(*>) :: ClientPure state a -> ClientPure state b -> ClientPure state b #

(<*) :: ClientPure state a -> ClientPure state b -> ClientPure state a #

Eq a => Eq (ClientPure state a) Source # 
Instance details

Defined in Hreq.Core.Client.RunClient

Methods

(==) :: ClientPure state a -> ClientPure state a -> Bool #

(/=) :: ClientPure state a -> ClientPure state a -> Bool #

Show a => Show (ClientPure state a) Source # 
Instance details

Defined in Hreq.Core.Client.RunClient

Methods

showsPrec :: Int -> ClientPure state a -> ShowS #

show :: ClientPure state a -> String #

showList :: [ClientPure state a] -> ShowS #