Safe Haskell | None |
---|
- type Session = ReaderT Application (StateT ClientState IO)
- runSession :: Session a -> Application -> IO a
- 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 ()
- data WaiTestFailure = WaiTestFailure String
Session
runSession :: Session a -> Application -> IO aSource
Requests
A default, blank request.
Since 2.0.0
setPath :: Request -> ByteString -> RequestSource
Set whole path (request path + query string).
setRawPathInfo :: Request -> ByteString -> RequestSource
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