wreq-stringless-0.5.9.1: Simple wrapper to use wreq without Strings
Safe HaskellNone
LanguageHaskell2010

Network.Wreq.StringLess.Session

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

Instances details
Show Session 
Instance details

Defined in Network.Wreq.Internal.Types

newSession :: IO Session #

Create a Session.

This session manages cookies and uses default session manager configuration.

Since: wreq-0.5.2.0

newAPISession :: IO Session #

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.

Since: wreq-0.5.2.0

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

newSessionControl #

Arguments

:: Maybe CookieJar

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

-> ManagerSettings 
-> IO Session 

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

Since: wreq-0.5.2.0

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.

Get information about session state

getSessionCookieJar :: Session -> IO (Maybe CookieJar) #

Extract current CookieJar from a Session

Since: wreq-0.5.2.0

HTTP verbs

GET

POST

HEAD

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

OPTIONS

PUT

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

DELTE

Custom Method

Custom Payload Method

Extending a session

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