Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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
runSession :: Session a -> Application -> IO a Source
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
A default, blank request.
Since 2.0.0
setPath :: Request -> ByteString -> Request Source
Set whole path (request path + query string).
setRawPathInfo :: Request -> ByteString -> Request Source
Assertions
assertStatus :: Int -> SResponse -> Session () Source
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