Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
charlespwd authored and lalitkapoor committed Jun 4, 2014
1 parent f4dcad0 commit adcf62b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,14 @@ request({url: 'http://www.google.com', jar: j}, function () {
request('http://images.google.com')
})
```

To inspect your cookie jar after a request

```javascript
var j = request.jar()
request({url: 'http://www.google.com', jar: j}, function () {
var cookie_string = j.getCookieString(uri); // "key1=value1; key2=value2; ..."
var cookies = j.getCookies(uri);
// [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...]
})
```

0 comments on commit adcf62b

Please sign in to comment.