wreq-rb 0.5.1-aarch64-linux → 0.6.0-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 +4 -4
- data/README.md +28 -0
- data/lib/wreq-rb/version.rb +1 -1
- data/lib/wreq_rb/2.7/wreq_rb.so +0 -0
- data/lib/wreq_rb/3.3/wreq_rb.so +0 -0
- data/lib/wreq_rb/3.4/wreq_rb.so +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f457452d4537ace62b3dbcdca8a4e136567db1df1b41eec6bd3e9a578f76e8a5
|
|
4
|
+
data.tar.gz: 20e556e4a8f9565f666398668961314f1562ed291c1ce1b0a1e7184f00c0e0b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4181f18f37f7c35caa01f4b1846601e440cacaefd746540826b43279f49f83905f2e4a21a8111759bcff097427111d6991e2555e7e8ccd2784dd45f04aff81e
|
|
7
|
+
data.tar.gz: cdec49207ea682f8b9cdb4c51825ed0d5d2bfaf7e87cece6433b3a4fa1e69f700e35efdc91f48db1a040419a6aa6f1f907380d736373906a21ceeff042672053
|
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:
|
data/lib/wreq-rb/version.rb
CHANGED
data/lib/wreq_rb/2.7/wreq_rb.so
CHANGED
|
Binary file
|
data/lib/wreq_rb/3.3/wreq_rb.so
CHANGED
|
Binary file
|
data/lib/wreq_rb/3.4/wreq_rb.so
CHANGED
|
Binary file
|
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.
|
|
4
|
+
version: 0.6.0
|
|
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-
|
|
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,
|