Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macdja38/stream-resume
http.get but with resuming for streams.
https://github.com/macdja38/stream-resume
Last synced: 28 days ago
JSON representation
http.get but with resuming for streams.
- Host: GitHub
- URL: https://github.com/macdja38/stream-resume
- Owner: macdja38
- Created: 2017-03-15T17:18:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-03T08:21:40.000Z (over 7 years ago)
- Last Synced: 2024-11-22T22:09:23.275Z (about 1 month ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stream-resume
https.get but with resuming for streams.Module does not yet support http or any request verbs other than get,
adding support for those would not be difficult and pull requests are welcome.By default it only recovers from ECONNRESET, with a max tries of 3. to increase the tries:
```js
let https = require("stream-resume");
https.get({
maxRetries: 3,
})
```URL's will have to be parsed with url.parse() before the maxRetries can be modified.
Because of the way the library abstracts over the ClientRequest object at the moment actions to the client request will
not properly carry through to the current request.Includes unit testing for the RebindableEventEmitter class. Run the test with `npm run test`