Skip to content

Commit 84c7030

Browse files
committed
update readme
1 parent 7a1a409 commit 84c7030

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "http_req"
3-
version = "0.9.3"
3+
version = "0.10.0"
44
license = "MIT"
55
description = "simple and lightweight HTTP client with built-in HTTPS support"
66
repository = "https://github.com/jayjamesjay/http_req"
@@ -11,7 +11,7 @@ keywords = ["http", "client", "request"]
1111
edition = "2021"
1212

1313
[dependencies]
14-
unicase = "^2.6"
14+
unicase = "^2.7"
1515

1616
[features]
1717
default = ["native-tls"]

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# http_req
22
[![Rust](https://github.com/jayjamesjay/http_req/actions/workflows/rust.yml/badge.svg)](https://github.com/jayjamesjay/http_req/actions/workflows/rust.yml)
3-
[![Crates.io](https://img.shields.io/badge/crates.io-v0.9.3-orange.svg?longCache=true)](https://crates.io/crates/http_req)
4-
[![Docs.rs](https://docs.rs/http_req/badge.svg)](https://docs.rs/http_req/0.9.3/http_req/)
3+
[![Crates.io](https://img.shields.io/badge/crates.io-v0.10.0-orange.svg?longCache=true)](https://crates.io/crates/http_req)
4+
[![Docs.rs](https://docs.rs/http_req/badge.svg)](https://docs.rs/http_req/0.10.0/http_req/)
55

66
Simple and lightweight HTTP client with built-in HTTPS support.
77

88
## Requirements
99
http_req by default uses [rust-native-tls](https://github.com/sfackler/rust-native-tls),
10-
which uses TLS framework provided by OS on Windows and macOS, and OpenSSL
10+
which relies on TLS framework provided by OS on Windows and macOS, and OpenSSL
1111
on all other platforms. But it also supports [rus-tls](https://crates.io/crates/rustls).
1212

1313
## Example
14-
Basic GET request
14+
Basic HTTP GET request
1515
```rust
1616
use http_req::request;
1717

1818
fn main() {
19-
let mut writer = Vec::new(); //container for body of a response
20-
let res = request::get("https://doc.rust-lang.org/", &mut writer).unwrap();
19+
let mut body = Vec::new(); //Container for body of a response.
20+
let res = request::get("https://doc.rust-lang.org/", &mut body).unwrap();
2121

2222
println!("Status: {} {}", res.status_code(), res.reason());
2323
}
2424
```
2525

26+
Take a look at [more examples](https://github.com/jayjamesjay/http_req/tree/master/examples)
27+
2628
## How to use with `rustls`:
2729
In order to use `http_req` with `rustls` in your project, add following lines to `Cargo.toml`:
2830
```toml
2931
[dependencies]
30-
http_req = {version="^0.9", default-features = false, features = ["rust-tls"]}
32+
http_req = {version="^0.10", default-features = false, features = ["rust-tls"]}
3133
```
3234

3335
## License

0 commit comments

Comments
 (0)