http-test: Test framework for HTTP APIs

[ bsd3, library, program, test, web ] [ Propose Tags ]

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

import Test.HTTP
import Data.List (isInfixOf)

main = httpTest $ do
  session "BayesHive landing page" "https://bayeshive.com" $ do
    landing <- get "/"
    assert "Correct blog link" $
      "href=\"https://bayeshive.com/blog\"" `isInfixOf` landing
    loginResult <- postForm "/auth/page/email/login"
                     [("email", "foo"), ("password", "bar")]
    debug loginResult

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.1.0, 0.2.2.0, 0.2.2.1, 0.2.3, 0.2.4, 0.2.5
Dependencies aeson (>=0.6 && <0.8), base (>=4 && <5), bytestring, curl (>=1.3.8 && <2), http-test, mtl (>=2.1 && <2.2), safe (>=0.2 && <0.4), stm (>=2.4 && <2.5), text (>=0.10 && <1.2) [details]
License BSD-3-Clause
Author OpenBrain Ltd
Maintainer tomn@openbrain.org
Category Test, Web
Home page https://github.com/openbrainsrc/http-test
Bug tracker https://github.com/openbrainsrc/http-test/issues
Source repo head: git clone https://github.com/openbrainsrc/http-test
Uploaded by glutamate at 2014-03-05T20:45:08Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables test-http-test
Downloads 11658 total (29 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]