Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yamadapc/superagent-progress
Superagent middleware to display a progress-bar for a request.
https://github.com/yamadapc/superagent-progress
Last synced: about 1 month ago
JSON representation
Superagent middleware to display a progress-bar for a request.
- Host: GitHub
- URL: https://github.com/yamadapc/superagent-progress
- Owner: yamadapc
- License: mit
- Created: 2015-09-11T19:04:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-15T14:58:32.000Z (over 9 years ago)
- Last Synced: 2024-12-24T11:58:05.306Z (about 1 month ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# superagent-progress
Superagent middleware to display a progress-bar for a request. Uses
`node-progress`.## Example
```javascript
var fs = require('fs');
var path = require('path');
var request = require('superagent');
var progress = require('superagent-progress');var stream = request.get('https://media.giphy.com/media/ym2AIZujHYCFa/giphy.gif')
.use(progress)
.pipe(fs.createWriteStream(path.join(__dirname, 'output.gif')));stream.on('close', function() {
console.log('Waiting...');
setTimeout(function() {
console.log('Worked?');
}, 1000);
});
```## License
This code is licensed under the MIT license.