Crates.io | minreq |
lib.rs | minreq |
version | |
source | src |
created_at | 2018-03-18 01:38:08.49222 |
updated_at | 2024-12-04 21:01:29.539432 |
description | Simple, minimal-dependency HTTP client |
homepage | https://github.com/neonmoe/minreq |
repository | https://github.com/neonmoe/minreq |
max_upload_size | |
id | 56193 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Simple, minimal-dependency HTTP client. Optional features for json
responses (json-using-serde
), unicode domains (punycode
), http
proxies (proxy
), and https with various TLS implementations
(https-rustls
, https-rustls-probe
, https-bundled
,
https-bundled-probe
,https-native
, and https
which is an alias
for https-rustls
).
Without any optional features, my casual testing indicates about 100
KB additional executable size for stripped release builds using this
crate. Compiled with rustc 1.45.2, println!("Hello, World!");
is 239
KB on my machine, where the hello example is 347
KB. Both are pure Rust, so aside from libc
, everything is statically
linked.
Note: some of the dependencies of this crate (especially serde
and
the various https
libraries) are a lot more complicated than this
library, and their impact on executable size reflects that.
This is a list of features I'll implement once it gets long enough, or a severe enough issue is found that there's good reason to make a major version bump.
http://
or https://
.rust-version
(at least 1.56) and edition
(at least 2021) fields to
Cargo.toml.If you don't care about the MSRV, you can ignore this section entirely, including the commands instructed.
We use an MSRV per major release, i.e., with a new major release we reserve the right to change the MSRV.
The current major version (v2) of this library should always compile with any combination of features excluding the TLS and urlencoding features on Rust 1.48. This is because those dependencies themselves have a higher MSRV.
That said, the crate does still require forcing some dependencies to lower-than-latest versions to actually compile with the older compiler, as these dependencies have upped their MSRV in a patch version. This can be achieved with the following (these just update your Cargo.lock):
cargo update --package=log --precise=0.4.18
cargo update --package=httpdate --precise=1.0.2
cargo update --package=serde_json --precise=1.0.100
cargo update --package=chrono --precise=0.4.23
cargo update --package=num-traits --precise=0.2.18
cargo update --package=libc --precise=0.2.163
# This again, for some reason.
cargo update --package=httpdate --precise=1.0.2
This crate is distributed under the terms of the ISC license.