Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Web request helpers and extensions to should.js
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Requisites

Web request helpers and extensions to should.js

Usage

var r = require('requisites');

Examples

Making requests

r.get(url, [data], function(res) {
  // assertions
});

Assertions

Assert success (HTTP 200)

response.should.succeed();

Assert redirections (HTTP 3XX)

response.should.redirect([httpCode]);
response.should.redirectTo(url[, httpCode]);

Assert failure (HTTP >= 400)

response.should.fail();
Something went wrong with that request. Please try again.