Skip to content

Commit

Permalink
v0.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
0x676e67 committed Dec 8, 2024
1 parent 05a6a6f commit 0e65b66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rquest"
version = "0.30.5"
version = "0.31.0"
description = "An ergonomic, all-in-one JA3/JA4/HTTP2 fingerprint HTTP/WebSocket client"
keywords = ["http", "client", "websocket", "ja3", "ja4"]
categories = ["web-programming::http-client"]
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An ergonomic, all-in-one `JA3`/`JA4`/`HTTP2` fingerprint `HTTP`/`WebSocket` clie
- Redirect policy
- Cookie Store
- Ultra-fast client setup
- Customizable Connection Pool
- Restrict pool [connections](https://docs.rs/rquest/latest/rquest/struct.ClientBuilder.html#method.pool_max_size)
- `HTTPS`/`WebSocket` via [BoringSSL](https://github.com/google/boringssl)
- Preconfigured `TLS`/`HTTP2` settings
- `HTTP`, `HTTPS`, `SOCKS4` and `SOCKS5` proxies
Expand All @@ -36,7 +36,7 @@ HTTP
```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
rquest = "0.30.0"
rquest = "0.31.0"
```

```rust,no_run
Expand All @@ -62,7 +62,7 @@ WebSocket
```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
rquest = { version = "0.30.0", features = ["websocket"] }
rquest = { version = "0.31.0", features = ["websocket"] }
```

```rust,no_run
Expand Down Expand Up @@ -111,12 +111,12 @@ Preconfigured `TLS`/`HTTP2`
```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
rquest = "0.30.0"
rquest = "0.31.0"
```

```rust
use boring::ssl::{SslConnector, SslCurve, SslMethod, SslOptions};
use http::{header, HeaderName, HeaderValue};
use http::{header, HeaderMap, HeaderName, HeaderValue};
use rquest::{
tls::{Http2Settings, ImpersonateSettings, TlsSettings, Version},
HttpVersionPref,
Expand Down Expand Up @@ -175,7 +175,8 @@ async fn main() -> Result<(), rquest::Error> {
])
.build(),
)
.headers(|headers| {
.headers({
let mut headers = HeaderMap::new();
headers.insert(header::USER_AGENT, HeaderValue::from_static("rquest"));
headers.insert(
header::ACCEPT_LANGUAGE,
Expand All @@ -187,6 +188,7 @@ async fn main() -> Result<(), rquest::Error> {
);
headers.insert(header::HOST, HeaderValue::from_static("tls.peet.ws"));
headers.insert(header::COOKIE, HeaderValue::from_static("foo=bar"));
headers
})
.headers_order(&HEADER_ORDER)
.build();
Expand All @@ -210,7 +212,7 @@ Modify `Client` settings
```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
rquest = "0.30.0"
rquest = "0.31.0"
```

```rust
Expand Down

0 comments on commit 0e65b66

Please sign in to comment.