Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 26, 2012
1 parent ae04e59 commit a3d332f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Readme.md
Expand Up @@ -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.