request-with-cookies
An enhancement to mikeal/request library to create reusuable clients that supports cookies per client
Usage
Create a new client and use the same API as mikeal/request
var request = ;var client = request;;
You can also create a client with baked in options
var request = ;var options = qs: q: "foo" ; var client = request;// now every request will be sent with "?q=foo" appended to the URL;
Custom cookies can be set by passing in the following options
var options = url: "https://foobar.com" cookies: name: "foo" value: "v1" name: "bar" value: "v2" ;
Build and Test
The code can be built using gulp as follows
$ gulp
Run tests using
$ npm test