wreq-rb 0.5.1-aarch64-linux → 0.6.1-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81136f1b3df3f8dd9186c9fe73cd5cfbdb633027724da6688447ab34cd98da63
4
- data.tar.gz: 805228038bb0f9b54b93beec65f069221cc9ddd393c80a878b3db614433fb6fb
3
+ metadata.gz: 3a59b2a80bdaf1731f7face8b86de25398d321fc9e0a66c434869d3c79ce9156
4
+ data.tar.gz: b95c12fbec41021bf3dce2013c1fb783f4babd0a930b54a395beccde0cc93e46
5
5
  SHA512:
6
- metadata.gz: b1b57a77798fdb61ef986680b7c508ef073dc9ec6a9b5393e108e7ed5a5433bfa8f72159cc8e07c47b7719d0d054a9f829e5bc870ce205331a7624651152672d
7
- data.tar.gz: 9af68ee94edd868ab579dbd40aebd3654b5d3fe363f07325eea8426a209a055bf2a0a1d3c70f23848e07effce78435b2cd898771b95765f4fd2a7b2a4c7af7e0
6
+ metadata.gz: aa1d89143efd742c76ec4b7acb4c2df0012c8f9934541f95380cf8ff11be8536ced80fda0408b5ac4b8af8db44eb2f1ce47b23b5cc955ed3a44305b28a9575eb
7
+ data.tar.gz: 01df00261a1bb432ae441694fb58dbe4662ac0230d30db31da62dba2339e4d81696c06deaf4f1117e0556ca05c9adc506ad1cfa2f2334a6cc5831e9657a5bd8b
data/README.md CHANGED
@@ -114,6 +114,34 @@ All methods are available on both `Wreq` (module-level) and `Wreq::Client` (inst
114
114
  | `head(url, **opts)` | HEAD request |
115
115
  | `options(url, **opts)` | OPTIONS request |
116
116
 
117
+ ### Batch Requests
118
+
119
+ `Wreq::Client#request_batch` runs many requests concurrently inside a **single**
120
+ GVL release, multiplexed over the client's connection pool. This avoids one Ruby
121
+ thread per request.
122
+
123
+ ```ruby
124
+ client = Wreq::Client.new(redirect: false, pool_max_idle_per_host: 32)
125
+
126
+ responses = client.request_batch(urls, concurrency: 128)
127
+ ```
128
+
129
+ Each element of the array is either a URL string or a hash:
130
+
131
+ ```ruby
132
+ client.request_batch([
133
+ "https://example.com/a", # GET
134
+ { method: :put, url: "https://example.com/b", body: "hi" }
135
+ ], concurrency: 32)
136
+ ```
137
+
138
+ - Results are returned **in input order**.
139
+ - Each element is a `Wreq::Response` **or** a `Wreq::Error` — a single failed
140
+ request never discards the rest of the batch. Errors are returned, not raised.
141
+ - `concurrency` caps the number of in-flight requests and defaults to `16`.
142
+ - `cancel` and Ruby thread interrupts abort the whole batch, raising
143
+ `Wreq::Error` with `"request interrupted"`.
144
+
117
145
  ### Cancelling Requests
118
146
 
119
147
  Call `cancel` on a client to interrupt all in-flight requests immediately:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wreq
4
- VERSION = "0.5.1"
4
+ VERSION = "0.6.1"
5
5
  end
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  diff --git a/src/client.rs b/src/client.rs
2
- index 4abe25d8..76e709a8 100644
2
+ index 214fe423..ccbdb0e9 100644
3
3
  --- a/src/client.rs
4
4
  +++ b/src/client.rs
5
5
  @@ -49,6 +49,7 @@ use self::{
@@ -10,18 +10,14 @@ index 4abe25d8..76e709a8 100644
10
10
  },
11
11
  request::{Request, RequestBuilder},
12
12
  response::Response,
13
- @@ -115,25 +116,30 @@ type MaybeDecompressionBody<T> = tower_http::decompression::DecompressionBody<T>
13
+ @@ -116,24 +117,26 @@ type MaybeDecompressionBody<T> = tower_http::decompression::DecompressionBody<T>
14
+
14
15
  type ClientService = Timeout<
15
16
  ConfigService<
16
- MaybeDecompression<
17
- - Retry<RetryPolicy, FollowRedirect<HttpClient<Connector, Body>, FollowRedirectPolicy>>,
18
- + TransferSizeService<
19
- + Retry<
20
- + RetryPolicy,
21
- + FollowRedirect<HttpClient<Connector, Body>, FollowRedirectPolicy>,
22
- + >,
23
- + >,
24
- >,
17
+ - MaybeDecompression<Retry<RetryPolicy, FollowRedirect<HttpClient<Connector, Body>>>>,
18
+ + MaybeDecompression<
19
+ + TransferSizeService<Retry<RetryPolicy, FollowRedirect<HttpClient<Connector, Body>>>>,
20
+ + >,
25
21
  >,
26
22
  >;
27
23
 
@@ -45,7 +41,7 @@ index 4abe25d8..76e709a8 100644
45
41
  BoxError,
46
42
  >;
47
43
 
48
- @@ -593,6 +599,10 @@ impl ClientBuilder {
44
+ @@ -597,6 +600,10 @@ impl ClientBuilder {
49
45
  })
50
46
  .service(service);
51
47
 
@@ -56,7 +52,7 @@ index 4abe25d8..76e709a8 100644
56
52
  #[cfg(any(
57
53
  feature = "gzip",
58
54
  feature = "zstd",
59
- @@ -1585,7 +1595,7 @@ impl ClientBuilder {
55
+ @@ -1607,7 +1614,7 @@ impl ClientBuilder {
60
56
  L: Layer<
61
57
  BoxCloneSyncService<
62
58
  http::Request<Body>,
@@ -65,7 +61,7 @@ index 4abe25d8..76e709a8 100644
65
61
  BoxError,
66
62
  >,
67
63
  > + Clone
68
- @@ -1594,7 +1604,7 @@ impl ClientBuilder {
64
+ @@ -1616,7 +1623,7 @@ impl ClientBuilder {
69
65
  + 'static,
70
66
  L::Service: Service<
71
67
  http::Request<Body>,
@@ -266,7 +262,7 @@ index 00000000..f155ec8d
266
262
  + }
267
263
  +}
268
264
  diff --git a/src/client/response.rs b/src/client/response.rs
269
- index 3d3532af..ed478804 100644
265
+ index 3d3532af..7d29ec45 100644
270
266
  --- a/src/client/response.rs
271
267
  +++ b/src/client/response.rs
272
268
  @@ -18,6 +18,7 @@ use mime::Mime;
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![CI](https://github.com/0x676e67/wreq/actions/workflows/ci.yml/badge.svg)](https://github.com/0x676e67/wreq/actions/workflows/ci.yml)
4
4
  [![Crates.io License](https://img.shields.io/crates/l/wreq)](https://github.com/0x676e67/wreq/blob/main/LICENSE)
5
- [![Crates.io MSRV](https://img.shields.io/crates/msrv/wreq?logo=rust)](https://crates.io/crates/wreq)
6
- [![crates.io](https://img.shields.io/crates/v/wreq.svg?logo=rust)](https://crates.io/crates/wreq)
5
+ [![Crates.io MSRV](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcrates.io%2Fapi%2Fv1%2Fcrates%2Fwreq%2Fversions%3Fsort%3Ddate%26per_page%3D1&query=%24.versions%5B0%5D.rust_version&suffix=.0&label=MSRV&color=blue&logo=rust)](https://crates.io/crates/wreq)
6
+ [![crates.io](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcrates.io%2Fapi%2Fv1%2Fcrates%2Fwreq&query=%24.crate.max_stable_version&prefix=v&label=crates.io&color=orange&logo=rust)](https://crates.io/crates/wreq)
7
7
  [![Discord chat][discord-badge]][discord-url]
8
8
 
9
9
  [discord-badge]: https://img.shields.io/discord/1486741856397164788.svg?logo=discord
@@ -35,8 +35,8 @@ The following example uses the [Tokio](https://tokio.rs) runtime with optional f
35
35
  ```toml
36
36
  [dependencies]
37
37
  tokio = { version = "1", features = ["full"] }
38
- wreq = "6.0.0-rc"
39
- wreq-util = "3.0.0-rc"
38
+ wreq = "0.16"
39
+ wreq-util = "0.2"
40
40
  ```
41
41
 
42
42
  And then the code:
@@ -53,7 +53,7 @@ async fn main() -> wreq::Result<()> {
53
53
  .build()?;
54
54
 
55
55
  // Use the API you're already familiar with
56
- let resp = client.get("https://tls.peet.ws/api/all").send().await?;
56
+ let resp = client.get("https://pingly.us.kg/api/all").send().await?;
57
57
  println!("{}", resp.text().await?);
58
58
  Ok(())
59
59
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wreq-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Yicheng Zhou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2026-06-09 00:00:00.000000000 Z
12
+ date: 2026-08-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: An ergonomic Ruby HTTP client powered by Rust's wreq library, featuring
15
15
  TLS fingerprint emulation (JA3/JA4), HTTP/2 support, cookie handling, proxy support,