Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Pass full options to net.request (e.g. allow limit of bandwith) #47

Open
the-nicolas opened this issue Feb 12, 2020 · 2 comments

Comments

@the-nicolas
Copy link

Right now net.reqeust() gets just called with the path attribute of the options object:
https://github.com/danielnieto/electron-download-manager/blob/master/index.js#L138

It would be good to allow all other options too. In my use case I would pass a session with the options to limit the maximum bandwith...

@danielnieto
Copy link
Owner

I get why it makes sense to pass the whole options object instead of a single property, but for your use case you mention that you want to limit the bandwidth, according to ClientRequest docs it does not have any property to allow this... do you mean that you want to pass the session so your backend can limit the bandwidth?

@the-nicolas
Copy link
Author

I had not tested it, but I thought I can pass a session to net.request() and configure that before:
https://www.electronjs.org/docs/api/session#sesenablenetworkemulationoptions

I need some way to slow down heavy downloads in the background...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants