fent / node-miniget

A small http(s) GET library.
MIT License
55 stars 17 forks source link

Add timeout option #50

Closed daoquangphuong closed 4 years ago

daoquangphuong commented 4 years ago

Hi, @fent currently I'm using your lib "ytdl-core". I saw that you are using miniget for getting HTML and Stream. Could you add a timeout option for this lib? so I can put it on requestOption on ytdl-core.

The reason is: my infinity loop has stopped because the miniget stopped when the internet connection was bad. I know that I can handle it by adding a timeout handle in the loop. but that's better if you add timeout opt for this lib Thanks

fent commented 4 years ago

hi, it accepts any option from node's http.request, which already has a timeout option

https://nodejs.org/api/http.html#http_http_request_options_callback

daoquangphuong commented 4 years ago

Thank you @fent