wreq-stringless-0.5.2.0: Simple wrapper to use wreq without Strings

Safe HaskellNone
LanguageHaskell2010

Network.Wreq.StringLess.Session

Contents

Description

Use this module instead of Network.Wreq.Session to use string-like datatypes.

see https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Session.html

Synopsis

Session creation

data Session :: * #

A session that spans multiple requests. This is responsible for cookie management and TCP connection reuse.

Instances

withSession :: (Session -> IO a) -> IO a #

Create a Session, passing it to the given function. The Session will no longer be valid after that function returns.

This session manages cookies and uses default session manager configuration.

withAPISession :: (Session -> IO a) -> IO a #

Create a session.

This uses the default session manager settings, but does not manage cookies. It is intended for use with REST-like HTTP-based APIs, which typically do not use cookies.

More control-oriented session creation

withSessionWith :: ManagerSettings -> (Session -> IO a) -> IO a #

Create a session, using the given manager settings. This session manages cookies.

withSessionControl #

Arguments

:: Maybe CookieJar

If Nothing is specified, no cookie management will be performed.

-> ManagerSettings 
-> (Session -> IO a) 
-> IO a 

Create a session, using the given cookie jar and manager settings.

HTTP verbs

head_ :: StringLike s => Session -> s -> IO (Response ()) Source #

put :: StringLike s => Putable a => Session -> s -> a -> IO (Response ByteString) Source #

Configurable verbs

Extending a session

seshRun :: Lens' Session (Session -> Run Body -> Run Body) #