Comparing version 0.0.5 to 0.0.6
@@ -234,2 +234,5 @@ // Copyright 2014 Tjatse | ||
// generate user-agent. | ||
if(typeof options.agent != 'boolean'){ | ||
options.agent = true; | ||
} | ||
if (options.agent) { | ||
@@ -236,0 +239,0 @@ headers['user-agent'] = ua.generate(); |
{ | ||
"name": "req-fast", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "This module is designed to be the fast, lightweight way to fetch the web content(HTML stream).", | ||
@@ -5,0 +5,0 @@ "main": "lib/req.js", |
@@ -32,3 +32,3 @@ # req-fast | ||
- **timeout** Set a timeout (in milliseconds) for the request. | ||
- **agent** A value indicating whether randomize generating browser-like `user-agent`, **CAUTION:** Once `user-agent` was generated, the `Process finished with exit code 0` thing will not happen unless triggered manually. | ||
- **agent** A value indicating whether automatic generating browser-like `user-agent`, `true` as default. **CAUTION:** Once `user-agent` was generated, the `Process finished with exit code 0` thing will not happen unless triggered manually. | ||
- **charset** Set charset of content encodings if necessary. **CAUTION:** This option takes top priority of decoding chunks, if not set, the `charset` in `response.headers['content-type']` will be used at first, then the `charset` on `<meta ... />`. | ||
@@ -35,0 +35,0 @@ - **disableRedirect** A value indicating whether disable following redirect or not, if this value was set to `true`, the `maxRedirects` will has no effect. |
@@ -8,3 +8,3 @@ var req = require('../'), | ||
describe('from google', function(){ | ||
it(', and everything goes fine', function(done){ | ||
it('everything goes fine', function(done){ | ||
req('http://www.google.com', function(err, resp){ | ||
@@ -11,0 +11,0 @@ should.not.exist(err); |
30976
423