Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- data Session :: *
- withSession :: (Session -> IO a) -> IO a
- withAPISession :: (Session -> IO a) -> IO a
- withSessionWith :: ManagerSettings -> (Session -> IO a) -> IO a
- withSessionControl :: Maybe CookieJar -> ManagerSettings -> (Session -> IO a) -> IO a
- get :: StringLike s => Session -> s -> IO (Response ByteString)
- post :: StringLike s => Postable a => Session -> s -> a -> IO (Response ByteString)
- head_ :: StringLike s => Session -> s -> IO (Response ())
- options :: StringLike s => Session -> s -> IO (Response ())
- put :: StringLike s => Putable a => Session -> s -> a -> IO (Response ByteString)
- delete :: StringLike s => Session -> s -> IO (Response ByteString)
- getWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString)
- postWith :: StringLike s => Postable a => Options -> Session -> s -> a -> IO (Response ByteString)
- headWith :: StringLike s => Options -> Session -> s -> IO (Response ())
- optionsWith :: StringLike s => Options -> Session -> s -> IO (Response ())
- putWith :: StringLike s => Putable a => Options -> Session -> s -> a -> IO (Response ByteString)
- deleteWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString)
- seshRun :: Lens' Session (Session -> Run Body -> Run Body)
Session creation
A session that spans multiple requests. This is responsible for cookie management and TCP connection reuse.
withSession :: (Session -> IO a) -> IO a #
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.
:: Maybe CookieJar | If |
-> ManagerSettings | |
-> (Session -> IO a) | |
-> IO a |
Create a session, using the given cookie jar and manager settings.
HTTP verbs
get :: StringLike s => Session -> s -> IO (Response ByteString) Source #
post :: StringLike s => Postable a => Session -> s -> a -> IO (Response ByteString) Source #
put :: StringLike s => Putable a => Session -> s -> a -> IO (Response ByteString) Source #
delete :: StringLike s => Session -> s -> IO (Response ByteString) Source #
Configurable verbs
getWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString) Source #
postWith :: StringLike s => Postable a => Options -> Session -> s -> a -> IO (Response ByteString) Source #
optionsWith :: StringLike s => Options -> Session -> s -> IO (Response ()) Source #
putWith :: StringLike s => Putable a => Options -> Session -> s -> a -> IO (Response ByteString) Source #
deleteWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString) Source #