wai-extra-3.0.21.0: Provides some basic WAI handlers and middleware.

Safe Haskell | None
Language | Haskell2010

Network.Wai.Test.Internal

Synopsis

- type Session = ReaderT Application (StateT ClientState IO)
- type ClientCookies = Map ByteString SetCookie
- data ClientState = ClientState {
  - clientCookies :: ClientCookies
  }
- initState :: ClientState
- runSessionWith :: ClientState -> Session a -> Application -> IO (a, ClientState)

# Documentation

type Session = ReaderT Application (StateT ClientState IO) Source #

type ClientCookies = Map ByteString SetCookie Source #

Since 3.0.6

data ClientState Source #

Constructors

ClientState |

Fields

- clientCookies :: ClientCookies

initState :: ClientState Source #

Since 3.0.20.0

runSessionWith :: ClientState -> Session a -> Application -> IO (a, ClientState) Source #

Like `runSession`, but if allows you to hand in cookies and get the updated cookies back. One use case for this is writing tests that address the application under test alternatingly through rest api and through db handle.

Since 3.0.20.0