shell-download
A zero-dependency Rust library for downloading a URL to a file by delegating to whatever download tools are available on the current system.
It hunts for (in order): curl, wget, pwsh/powershell, and finally
openssl (HTTPS via openssl s_client, HTTP via a raw TCP GET).
- The caller provides a target path.
- That file is unlinked before the request starts.
- The response body is written to that path (decompressed if the response is gzip).
- The request runs in a background thread and returns a cancellable handle.
Features
By default, these features are not enabled, making the crate zero-dependency.
url: Parse URLs using theurlcrate (adds a number of dependencies, but makes URL parsing more accurate).in-memory: Receive the response body as a String or Vec instead of requiring a path. Uses thetempfilecrate.
Usage
use ;