leeroybrun / node-mt-files-downloader

Simple module letting you download a file from the web, compute stats, retry in case of error, etc
MIT License
84 stars 44 forks source link

Support customized header fields #19

Closed ayking closed 7 years ago

ayking commented 7 years ago

support customized header fields

leeroybrun commented 7 years ago

Thanks!

oscartbeaumont commented 6 years ago

How do you add the headers to the download request. I have tried a few ways and then have all ended in the server not seeing the headers I assigned.

ayking commented 6 years ago

@oscartbeaumont should like this

var Downloader = require('mt-files-downloader') var downloader = new Downloader() downloader.setOptions({headers: [key: value]})

As this PR is few months ago and I already forgot so if it is not working please check the source in this library. Thanks