Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Session = ReaderT Application (StateT ClientState IO)
- runSession :: Session a -> Application -> IO a
- request :: Request -> Session SResponse
- srequest :: SRequest -> Session SResponse
- data SRequest = SRequest {
- simpleRequest :: Request
- simpleRequestBody :: ByteString
- data SResponse = SResponse {
- simpleStatus :: Status
- simpleHeaders :: ResponseHeaders
- simpleBody :: ByteString
- 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 a Source
Requests
SRequest | |
|
SResponse | |
|
defaultRequest :: Request
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