+**NB** Do not set cookie field directly in request header as it will be overwritten.
+
+##Redirects
+
+Redirects are on by default, use `options.disableRedirects` to disable. Maximum redirect count can be set with `options.maxRedirects` (defaults to 10)
+
+ options = {
+ disableRedirects: true
+ }
+
+ options = {
+ maxRedirects: 100
+ }
+
+##Disable Gzip support
+
+Gzip and Deflate support is automatically on. This is problematic in Node v0.5.9 and below since Zlib on these versions is buggy and tends to yield in error.
+
+ options = {
+ disableGzip: true
+ }
+
##Piping to file
-Stream URL contents directly to file
+`FetchStream` is a readable Stream object and thus can be piped. For example stream URL contents directly to a file:
var FetchStream = require("./fetch").FetchStream,
fs = require("fs"),
@@ -21,7 +69,6 @@ Stream URL contents directly to file
out = fs.createWriteStream('file.html');
new FetchStream("http://www.example.com/index.php").pipe(out);
0 comments on commit
a13ba38