Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- get :: ByteString -> WaiSession st (Response ByteString)
- post :: ByteString -> ByteString -> WaiSession st (Response ByteString)
- put :: ByteString -> ByteString -> WaiSession st (Response ByteString)
- patch :: ByteString -> ByteString -> WaiSession st (Response ByteString)
- options :: ByteString -> WaiSession st (Response ByteString)
- delete :: ByteString -> WaiSession st (Response ByteString)
- request :: Method -> ByteString -> [Header] -> ByteString -> WaiSession st (Response ByteString)
- performRequest :: Request -> WaiSession st (Response ByteString)
- shouldRespondWith :: HasCallStack => WaiSession st (Response ByteString) -> ResponseMatcher -> WaiExpectation st
Documentation
get :: ByteString -> WaiSession st (Response ByteString) Source #
Perform a GET
request to the application under test.
post :: ByteString -> ByteString -> WaiSession st (Response ByteString) Source #
Perform a POST
request to the application under test.
put :: ByteString -> ByteString -> WaiSession st (Response ByteString) Source #
Perform a PUT
request to the application under test.
patch :: ByteString -> ByteString -> WaiSession st (Response ByteString) Source #
Perform a PATCH
request to the application under test.
options :: ByteString -> WaiSession st (Response ByteString) Source #
Perform an OPTIONS
request to the application under test.
delete :: ByteString -> WaiSession st (Response ByteString) Source #
Perform a DELETE
request to the application under test.
request :: Method -> ByteString -> [Header] -> ByteString -> WaiSession st (Response ByteString) Source #
Perform a request to the application under test, with specified HTTP method, request path, headers and body.
performRequest :: Request -> WaiSession st (Response ByteString) Source #
shouldRespondWith :: HasCallStack => WaiSession st (Response ByteString) -> ResponseMatcher -> WaiExpectation st Source #
Make a test assertion using a ResponseMatcher
on the Response
produced by the given action
This function is provided for backward compatibility with wai-test but this approach has been made obsolete by the way sydtest does things.
You should use shouldBe
based on the responses that you get from functions like get
and post
instead.