Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created July 8, 2014 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpowell/42e628e4afb7897c2671 to your computer and use it in GitHub Desktop.
Save aaronpowell/42e628e4afb7897c2671 to your computer and use it in GitHub Desktop.
Simple request asserting
var request = require('requst'); //npm install request
var assert = require('assert'); //build in to Node.js
request('http://httpstat.us/200', function (err, res, body) {
assert.equal(res.statusCode, 200, 'Expected a 200 response');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment