Skip to content
Browse files

docs

  • Loading branch information...
1 parent ae04e59 commit a3d332f5aa51c3066d9ba0b7d6d329e162a8b8d3 @tj tj committed Jun 26, 2012
Showing with 23 additions and 1 deletion.
  1. +23 −1 Readme.md
View
24 Readme.md
@@ -35,4 +35,26 @@ request(app)
.end(function(err, res){
if (err) throw err;
});
-```
+```
+
+## API
+
+ You may use any [super-agent](http://github.com/visionmedia/superagent) methods,
+ including `.write()`, `.pipe()` etc and perform assertions in the `.end()` callback
+ for lower-level needs.
+
+### .expect(status[, fn])
+
+ Assert response `status` code.
+
+### .expect(body[, fn])
+
+ Assert response `body` text with a string or regular expression.
+
+### .expect(field, value[, fn])
+
+ Assert header `field` `value` with a string or regular expression.
+
+### .end(fn)
+
+ Perform the request and invoke `fn(err, res)`.

0 comments on commit a3d332f

Please sign in to comment.
Something went wrong with that request. Please try again.