Gofer.rs makes it easy to fetch data from any URL in Rust.
Just call gofer::open(url) to get back a Read!
- Currently supports
https:,http:,ftp:,file:, anddata:URLs. - Supports opting out of any feature using comprehensive feature flags.
- Adheres to the Rust API Guidelines in its naming conventions.
- 100% free and unencumbered public domain software.
- Rust 1.81+
cargo add gofer[dependencies]
gofer = "0.1"[dependencies]
gofer = { version = "0.1", default-features = false, features = ["file"] }use gofer::open;let result = gofer::open("https://www.google.com/robots.txt");let result = gofer::open("ftp://ftp.isc.org/welcome.msg");let result = gofer::open("file:///path/to/file.txt");let result = gofer::open("stdin:");let result = gofer::open("data:,Hello%2C%20world%21%0A");| Scheme | Feature | Summary |
|---|---|---|
data: |
data |
Inline data in Base64 or URL-encoded format |
file: |
file |
Local file path |
ftp: |
ftp |
FTP |
http: |
http |
HTTP |
https: |
https |
HTTPS |
stdin: |
stdin |
Standard input stream |
| Crate (Feature) | Version | Usage | Summary |
|---|---|---|---|
clap Β ("clap") |
4.5 | Implements clap::builder::TypedValueParser (TBD) |
|
miette Β ("miette") |
7.5 | Derives miette::Diagnostic on gofer::Error |
|
| Β |
git clone https://github.com/dryrust/gofer.rs.git