stack-1.9.3.1: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.StackClient

Description

Wrapper functions of Simple and Client to add the 'User-Agent' HTTP request header to each request.

Documentation

httpLbs :: MonadIO m => Request -> m (Response ByteString) Source #

httpLBS :: MonadIO m => Request -> m (Response ByteString) Source #

withResponse :: (MonadUnliftIO m, MonadIO n) => Request -> (Response (ConduitM i ByteString n ()) -> m a) -> m a Source #

withResponseByManager :: MonadUnliftIO m => Request -> Manager -> (Response BodyReader -> m a) -> m a Source #

responseHeaders :: Response body -> ResponseHeaders #

responseStatus :: Response body -> Status #

responseBody :: Response body -> body #

setUri :: MonadThrow m => Request -> URI -> m Request #

getUri :: Request -> URI #

checkResponse :: Request -> Request -> Response BodyReader -> IO () #

requestHeaders :: Request -> RequestHeaders #

displayDigestAuthException :: DigestAuthException -> String #

data Request #

Instances
Show Request 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Request -> ShowS

show :: Request -> String #

showList :: [Request] -> ShowS

data Response body #

Instances
Functor Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fmap :: (a -> b) -> Response a -> Response b #

(<$) :: a -> Response b -> Response a #

Foldable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fold :: Monoid m => Response m -> m #

foldMap :: Monoid m => (a -> m) -> Response a -> m #

foldr :: (a -> b -> b) -> b -> Response a -> b #

foldr' :: (a -> b -> b) -> b -> Response a -> b

foldl :: (b -> a -> b) -> b -> Response a -> b

foldl' :: (b -> a -> b) -> b -> Response a -> b #

foldr1 :: (a -> a -> a) -> Response a -> a

foldl1 :: (a -> a -> a) -> Response a -> a

toList :: Response a -> [a] #

null :: Response a -> Bool #

length :: Response a -> Int #

elem :: Eq a => a -> Response a -> Bool #

maximum :: Ord a => Response a -> a

minimum :: Ord a => Response a -> a

sum :: Num a => Response a -> a #

product :: Num a => Response a -> a #

Traversable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) #

sequenceA :: Applicative f => Response (f a) -> f (Response a) #

mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) #

sequence :: Monad m => Response (m a) -> m (Response a) #

Eq body => Eq (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

(==) :: Response body -> Response body -> Bool #

(/=) :: Response body -> Response body -> Bool #

Show body => Show (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Response body -> ShowS

show :: Response body -> String #

showList :: [Response body] -> ShowS

data Manager #

Instances
HasHttpManager Manager 
Instance details

Defined in Network.HTTP.Client.Types

methodPut :: Method #

ok200 :: Status #

data Proxy #

Instances
Eq Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

(==) :: Proxy -> Proxy -> Bool #

(/=) :: Proxy -> Proxy -> Bool #

Ord Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

compare :: Proxy -> Proxy -> Ordering #

(<) :: Proxy -> Proxy -> Bool #

(<=) :: Proxy -> Proxy -> Bool #

(>) :: Proxy -> Proxy -> Bool #

(>=) :: Proxy -> Proxy -> Bool #

max :: Proxy -> Proxy -> Proxy #

min :: Proxy -> Proxy -> Proxy #

Read Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

readsPrec :: Int -> ReadS Proxy

readList :: ReadS [Proxy]

readPrec :: ReadPrec Proxy

readListPrec :: ReadPrec [Proxy]

Show Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Proxy -> ShowS

show :: Proxy -> String #

showList :: [Proxy] -> ShowS

useProxy :: Proxy -> ProxyOverride #

noProxy :: ProxyOverride #

proxyEnvironment :: Maybe Proxy -> ProxyOverride #

managerSetProxy :: ProxyOverride -> ManagerSettings -> ManagerSettings #

formDataBody :: MonadIO m => [Part] -> Request -> m Request #

partBS :: Text -> ByteString -> Part #

partLBS :: Text -> ByteString -> Part #