node-wget icon indicating copy to clipboard operation
node-wget copied to clipboard

follow redirect

Open crodas opened this issue 10 years ago • 2 comments

Follow redirect, very simple approach

crodas avatar Dec 16 '13 17:12 crodas

@crodas I see an error with this:

opts =
  from: 'https://github.com/caolan/async/archive/v0.2.5.zip'
  to: '/Users/franklovecchio/test/node_modules/async.zip'

download = wget.download opts.from, opts.to, { }

download.on 'error', (error) -> throw new Error error
download.on 'end', () ->

Error:

wget/lib/wget.js:57
        if (res.header.location) {
                      ^
TypeError: Cannot read property 'location' of undefined

ghost avatar Dec 27 '13 23:12 ghost

@ghost I'm getting the same error

gnestor avatar Oct 10 '16 15:10 gnestor