Socket
Socket
Sign inDemoInstall

follow-redirects

Package Overview
Dependencies
3
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

3

create.js

@@ -5,2 +5,3 @@ 'use strict';

var assert = require('assert');
var consume = require('stream-consume');

@@ -44,3 +45,3 @@ module.exports = function(_nativeProtocols) {

// to consume the stream and send the 'end' event
res.on('data', function() {});
consume(res);

@@ -47,0 +48,0 @@ // need to use url.resolve() in case location is a relative URL

{
"name": "follow-redirects",
"version": "0.0.6",
"version": "0.0.7",
"description": "HTTP and HTTPS modules that follow redirects.",

@@ -45,3 +45,4 @@ "main": "index.js",

"dependencies": {
"debug": "^2.2.0"
"debug": "^2.2.0",
"stream-consume": "^0.1.0"
},

@@ -48,0 +49,0 @@ "devDependencies": {

@@ -13,3 +13,3 @@ ## Follow Redirects

`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback)
`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback)
methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback)

@@ -52,3 +52,3 @@ modules, with the exception that they will seamlessly follow redirects.

}, function (res) {
console.log(res.fetchedUrls);
console.log(res.fetchedUrls);
// [ 'http://duckduckgo.com/robots.txt', 'http://bitly.com/UHfDGO' ]

@@ -61,3 +61,3 @@ });

Due to the way `XMLHttpRequest` works, the `browserify` versions of `http` and `https` already follow redirects.
If you are *only* targetting the browser, then this library has little value for you. If you want to write cross
If you are *only* targetting the browser, then this library has little value for you. If you want to write cross
platform code for node and the browser, `follow-redirects` provides a great solution for making the native node

@@ -84,6 +84,6 @@ modules behave the same as they do in browserified builds in the browser. To avoid bundling unnecessary code

module when running in the browser. If you are experiencing problems, you may want to check out
[browserify-http-2](https://www.npmjs.com/package/http-browserify-2). It is more actively maintained and
[browserify-http-2](https://www.npmjs.com/package/http-browserify-2). It is more actively maintained and
attempts to address a few of the shortcomings of `browserify-http`. In that case, your browserify config should
look something like this:
```javascript

@@ -101,3 +101,3 @@ "browser": {

by tests. You can run the test suite locally with a simple `npm test` command.
## Debug Logging

@@ -104,0 +104,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc