Skip to content

Commit

Permalink
Add example how one could modify the options passed to request
Browse files Browse the repository at this point in the history
  • Loading branch information
vesln committed Jan 30, 2014
1 parent 312a757 commit ee183ee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -75,6 +75,20 @@ hippie()
if (err) throw err;
});
```
With middlewares you can modify the options passed to `request`. Here is an
example how you could persist the cookies across multiple requests:

```js
hippie(app)
.get('/')
.use(persistCookies)
.end(function() {});

function persistCookies(opts, next) {
opts.jar = true;
next(opts);
}
```

### Serializers and parsers

Expand Down

0 comments on commit ee183ee

Please sign in to comment.