Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Session = ReaderT Application (StateT ClientState IO)
- runSession :: Session a -> Application -> IO a
- type ClientCookies = Map ByteString SetCookie
- getClientCookies :: Session ClientCookies
- modifyClientCookies :: (ClientCookies -> ClientCookies) -> Session ()
- setClientCookie :: SetCookie -> Session ()
- deleteClientCookie :: ByteString -> Session ()
- request :: Request -> Session SResponse
- srequest :: SRequest -> Session SResponse
- data SRequest = SRequest {}
- data SResponse = SResponse {}
- defaultRequest :: Request
- setPath :: Request -> ByteString -> Request
- setRawPathInfo :: Request -> ByteString -> Request
- assertStatus :: Int -> SResponse -> Session ()
- assertContentType :: ByteString -> SResponse -> Session ()
- assertBody :: ByteString -> SResponse -> Session ()
- assertBodyContains :: ByteString -> SResponse -> Session ()
- assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
- assertNoHeader :: CI ByteString -> SResponse -> Session ()
- assertClientCookieExists :: String -> ByteString -> Session ()
- assertNoClientCookieExists :: String -> ByteString -> Session ()
- assertClientCookieValue :: String -> ByteString -> ByteString -> Session ()
- data WaiTestFailure = WaiTestFailure String
Session
type Session = ReaderT Application (StateT ClientState IO) Source #
runSession :: Session a -> Application -> IO a Source #
See also: runSessionWith
.
Client Cookies
type ClientCookies = Map ByteString SetCookie Source #
Since 3.0.6
getClientCookies :: Session ClientCookies Source #
Since 3.0.6
modifyClientCookies :: (ClientCookies -> ClientCookies) -> Session () Source #
Since 3.0.6
setClientCookie :: SetCookie -> Session () Source #
Since 3.0.6
deleteClientCookie :: ByteString -> Session () Source #
Since 3.0.6
Requests
srequest :: SRequest -> Session SResponse Source #
Similar to request
, but allows setting the request body as a plain
ByteString
.
SRequest | |
|
A default, blank request.
Since 2.0.0
setRawPathInfo :: Request -> ByteString -> Request Source #
Assertions
assertContentType :: ByteString -> SResponse -> Session () Source #
assertBody :: ByteString -> SResponse -> Session () Source #
assertBodyContains :: ByteString -> SResponse -> Session () Source #
assertHeader :: CI ByteString -> ByteString -> SResponse -> Session () Source #
assertNoHeader :: CI ByteString -> SResponse -> Session () Source #
assertClientCookieExists :: String -> ByteString -> Session () Source #
Since 3.0.6
assertNoClientCookieExists :: String -> ByteString -> Session () Source #
Since 3.0.6
assertClientCookieValue :: String -> ByteString -> ByteString -> Session () Source #
Since 3.0.6
data WaiTestFailure Source #
Instances
Eq WaiTestFailure Source # | |
Defined in Network.Wai.Test (==) :: WaiTestFailure -> WaiTestFailure -> Bool # (/=) :: WaiTestFailure -> WaiTestFailure -> Bool # | |
Show WaiTestFailure Source # | |
Defined in Network.Wai.Test showsPrec :: Int -> WaiTestFailure -> ShowS # show :: WaiTestFailure -> String # showList :: [WaiTestFailure] -> ShowS # | |
Exception WaiTestFailure Source # | |
Defined in Network.Wai.Test |