Skip to content

Commit

Permalink
Note in readme about MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Nov 28, 2024
1 parent 24686d0 commit a448048
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@

A simple, safe HTTP client.

> [!NOTE]
> ureq version 2.11.0 was forced to bump MSRV from 1.63 -> 1.67. The problem is that the
> `time` crate 0.3.20, the last 1.63 compatible version, stopped compiling with Rust
> [1.80 and above](https://github.com/algesten/ureq/pull/878#issuecomment-2503176155).
> To release a 2.x version that is possible to compile on the latest Rust we were
> forced to bump MSRV.


Ureq's first priority is being easy for you to use. It's great for
anyone who wants a low-overhead HTTP client that just gets the job done. Works
Expand Down Expand Up @@ -82,7 +90,7 @@ Ureq supports sending and receiving json, if you enable the "json" feature:

```rust
// Requires the `json` feature enabled.
let resp: String = ureq::post("http://myapi.example.com/ingest")
let resp: String = ureq::post("http://myapi.example.com/post/ingest")
.set("X-My-Header", "Secret")
.send_json(ureq::json!({
"name": "martin",
Expand Down Expand Up @@ -247,7 +255,8 @@ be manually configured using [`AgentBuilder::tls_connector`].

You might want to use native-tls if you need to interoperate with servers that
only support less-secure TLS configurations (rustls doesn't support TLS 1.0 and 1.1, for
instance).
instance). You might also want to use it if you need to validate certificates for IP addresses,
which are not currently supported in rustls.

Here's an example of constructing an Agent that uses native-tls. It requires the
"native-tls" feature to be enabled.
Expand Down Expand Up @@ -319,6 +328,7 @@ If ureq is not what you're looking for, check out these other Rust HTTP clients:
[std::sync::Arc]: https://doc.rust-lang.org/stable/alloc/sync/struct.Arc.html
[std::io::Read]: https://doc.rust-lang.org/stable/std/io/trait.Read.html
[Agent]: https://docs.rs/ureq/latest/ureq/struct.Agent.html
[AgentBuilder]: https://docs.rs/ureq/latest/ureq/struct.AgentBuilder.html
[get()]: https://docs.rs/ureq/latest/ureq/fn.get.html
[post()]: https://docs.rs/ureq/latest/ureq/fn.post.html
[put()]: https://docs.rs/ureq/latest/ureq/fn.put.html
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
//!
//! A simple, safe HTTP client.
//!
//! > [!NOTE]

Check failure on line 39 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Docs

unresolved link to `!NOTE`

Check failure on line 39 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Docs

unresolved link to `!NOTE`
//! > ureq version 2.11.0 was forced to bump MSRV from 1.63 -> 1.67. The problem is that the
//! > `time` crate 0.3.20, the last 1.63 compatible version, stopped compiling with Rust
//! > [1.80 and above](https://github.com/algesten/ureq/pull/878#issuecomment-2503176155).
//! > To release a 2.x version that is possible to compile on the latest Rust we were
//! > forced to bump MSRV.
//!
//!
//!
//! Ureq's first priority is being easy for you to use. It's great for
//! anyone who wants a low-overhead HTTP client that just gets the job done. Works
Expand Down

0 comments on commit a448048

Please sign in to comment.