Skip to content

Commit

Permalink
docs: add note about sponsors/support
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Mar 19, 2024
1 parent 2fe53c5 commit d0d2b47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

An ergonomic, batteries-included HTTP Client for Rust.

- Async and blocking `Client`s
- Plain bodies, JSON, urlencoded, multipart
- Customizable redirect policy
- HTTP Proxies
- HTTPS via system-native TLS (or optionally, rustls)
- Cookie Store
- WASM
- [Changelog](CHANGELOG.md)


## Example
Expand Down Expand Up @@ -43,25 +43,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
```

## Blocking Client
## Commercial Support

There is an optional "blocking" client API that can be enabled:

```toml
[dependencies]
reqwest = { version = "0.11", features = ["blocking", "json"] }
```

```rust,no_run
use std::collections::HashMap;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let resp = reqwest::blocking::get("https://httpbin.org/ip")?
.json::<HashMap<String, String>>()?;
println!("{resp:#?}");
Ok(())
}
```
For private advice, support, reviews, access to the maintainer, and the like, reach out for [commercial support][sponsor].

## Requirements

Expand Down Expand Up @@ -93,3 +77,9 @@ Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.

## Sponsors

Support this project by becoming a [sponsor][].

[sponsor]: https://seanmonstar.com/sponsor
12 changes: 11 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
//! - [The Rust Cookbook](https://rust-lang-nursery.github.io/rust-cookbook/web/clients.html)
//! - [Reqwest Repository Examples](https://github.com/seanmonstar/reqwest/tree/master/examples)
//!
//! ## Commercial Support
//!
//! For private advice, support, reviews, access to the maintainer, and the
//! like, reach out for [commercial support][sponsor].
//!
//! ## Making a GET request
//!
//! For a single request, you can use the [`get`][get] shortcut method.
Expand Down Expand Up @@ -215,7 +220,11 @@
//! RUSTFLAGS="--cfg reqwest_unstable" cargo build
//! ```
//!
//! [hyper]: http://hyper.rs
//! ## Sponsors
//!
//! Support this project by becoming a [sponsor][].
//!
//! [hyper]: https://hyper.rs
//! [blocking]: ./blocking/index.html
//! [client]: ./struct.Client.html
//! [response]: ./struct.Response.html
Expand All @@ -225,6 +234,7 @@
//! [redirect]: crate::redirect
//! [Proxy]: ./struct.Proxy.html
//! [cargo-features]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section
//! [sponsor]: https://seanmonstar.com/sponsor

#[cfg(all(feature = "http3", not(reqwest_unstable)))]
compile_error!(
Expand Down

0 comments on commit d0d2b47

Please sign in to comment.