Test framework for HTTP APIs

Latest on Hackage:0.2.5

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by OpenBrain Ltd
Maintained by

A simple framework for making assertions about the responses of HTTP servers.

import Test.HTTP
import Data.List (isInfixOf)

main = defaultMain $ httpTestCase "BayesHive landing page" "" $ do
    landing <- get "/"
    assert "Correct blog link" $
      "href=\"\"" `isInfixOf` landing
    loginResult <- postForm "/auth/page/email/login"
                     [("email", "foo"), ("password", "bar")]
    debug loginResult
Used by 1 package:
comments powered byDisqus