| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Wreq.Wrecker
Description
- data Session
- defaultManagerSettings :: ConnectionContext -> ManagerSettings
- withWreq :: (Session -> IO a) -> Environment -> IO a
- withWreqNoCookies :: (Session -> IO a) -> Environment -> IO a
- withWreqSettings :: Recorder -> Maybe CookieJar -> ManagerSettings -> (Session -> IO a) -> IO a
- get :: Session -> String -> IO (Response ByteString)
- post :: Postable a => Session -> String -> a -> IO (Response ByteString)
- head_ :: Session -> String -> IO (Response ())
- options :: Session -> String -> IO (Response ())
- put :: Putable a => Session -> String -> a -> IO (Response ByteString)
- delete :: Session -> String -> IO (Response ByteString)
- getWith :: Options -> Session -> String -> IO (Response ByteString)
- postWith :: Postable a => Options -> Session -> String -> a -> IO (Response ByteString)
- headWith :: Options -> Session -> String -> IO (Response ())
- optionsWith :: Options -> Session -> String -> IO (Response ())
- putWith :: Putable a => Options -> Session -> String -> a -> IO (Response ByteString)
- deleteWith :: Options -> Session -> String -> IO (Response ByteString)
Documentation
An opaque type created by withWreq, withWreqNoCookies,
or withWreqSettings. All HTTP calls require a Session.
defaultManagerSettings :: ConnectionContext -> ManagerSettings Source #
Create ManagerSettings with no timeout using a shared TLS
ConnectionContext
Session Creation
withWreq :: (Session -> IO a) -> Environment -> IO a Source #
Create a Session using the wrecker Environment, 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.
withWreqNoCookies :: (Session -> IO a) -> Environment -> IO a Source #
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.
Arguments
| :: Recorder | |
| -> Maybe CookieJar | If |
| -> ManagerSettings | |
| -> (Session -> IO a) | |
| -> IO a |
Create a session, using the given cookie jar and manager settings.
HTTP Methods
HTTP Methods with Options
optionsWith :: Options -> Session -> String -> IO (Response ()) Source #
Session-specific version of optionsWith.
deleteWith :: Options -> Session -> String -> IO (Response ByteString) Source #
Session-specific version of deleteWith.