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

Support additional curl/wget args in files.download #1253

Open
soderluk opened this issue Dec 18, 2024 · 0 comments
Open

Support additional curl/wget args in files.download #1253

soderluk opened this issue Dec 18, 2024 · 0 comments

Comments

@soderluk
Copy link

Is your feature request related to a problem? Please describe

There's a multitude of ways one could download a file with curl/wget. Currently the only options e.g. curl uses in files.download() is -sSLf.
As an example, when downloading the Rust installer, they suggest to add curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs when using curl.
This is not currently possible to do, since files.download() doesn't take additional curl arguments.

Describe the solution you'd like

Add the curl/wget arguments to files.download(..., curl_args: list[Union[str, StringCommand]] = ["-sSLf"], wget_args: list[Union[str, StringCommand]] = ["-q"]) instead, and default them to the args that would be normally set.
Or add them as optional arguments, and update the default args to be passed to curl/wget. Whichever you think would be better. I would prefer the default arguments, because then the control is given to the user instead.

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

1 participant