httpx 1.4.0 → 1.4.4
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 +1 -2
- data/doc/release_notes/1_4_1.md +19 -0
- data/doc/release_notes/1_4_2.md +20 -0
- data/doc/release_notes/1_4_3.md +11 -0
- data/doc/release_notes/1_4_4.md +14 -0
- data/lib/httpx/adapters/datadog.rb +55 -83
- data/lib/httpx/adapters/faraday.rb +1 -1
- data/lib/httpx/adapters/webmock.rb +11 -1
- data/lib/httpx/callbacks.rb +2 -2
- data/lib/httpx/connection/http2.rb +33 -18
- data/lib/httpx/connection.rb +115 -55
- data/lib/httpx/errors.rb +3 -4
- data/lib/httpx/io/ssl.rb +6 -3
- data/lib/httpx/loggable.rb +13 -6
- data/lib/httpx/plugins/callbacks.rb +1 -0
- data/lib/httpx/plugins/circuit_breaker.rb +1 -0
- data/lib/httpx/plugins/expect.rb +1 -1
- data/lib/httpx/plugins/grpc/grpc_encoding.rb +2 -0
- data/lib/httpx/plugins/internal_telemetry.rb +21 -1
- data/lib/httpx/plugins/retries.rb +2 -2
- data/lib/httpx/plugins/stream.rb +42 -18
- data/lib/httpx/request/body.rb +9 -14
- data/lib/httpx/request.rb +37 -3
- data/lib/httpx/resolver/https.rb +4 -2
- data/lib/httpx/resolver/native.rb +111 -55
- data/lib/httpx/resolver/resolver.rb +18 -11
- data/lib/httpx/resolver/system.rb +3 -5
- data/lib/httpx/response.rb +9 -4
- data/lib/httpx/selector.rb +33 -23
- data/lib/httpx/session.rb +20 -49
- data/lib/httpx/timers.rb +16 -1
- data/lib/httpx/transcoder/body.rb +15 -31
- data/lib/httpx/transcoder/multipart/encoder.rb +2 -1
- data/lib/httpx/transcoder/multipart/part.rb +1 -1
- data/lib/httpx/version.rb +1 -1
- data/lib/httpx.rb +1 -1
- data/sig/callbacks.rbs +2 -2
- data/sig/connection/http2.rbs +4 -0
- data/sig/connection.rbs +19 -5
- data/sig/errors.rbs +3 -3
- data/sig/loggable.rbs +2 -2
- data/sig/plugins/stream.rbs +3 -0
- data/sig/pool.rbs +2 -0
- data/sig/request/body.rbs +0 -8
- data/sig/request.rbs +12 -0
- data/sig/resolver/native.rbs +6 -1
- data/sig/response.rbs +8 -3
- data/sig/selector.rbs +1 -0
- data/sig/session.rbs +2 -0
- data/sig/timers.rbs +15 -4
- data/sig/transcoder/body.rbs +1 -3
- data/sig/transcoder/json.rbs +1 -1
- data/sig/transcoder/multipart.rbs +1 -1
- data/sig/transcoder/utils/body_reader.rbs +1 -1
- data/sig/transcoder/utils/deflater.rbs +1 -2
- metadata +11 -9
- data/lib/httpx/session2.rb +0 -23
- data/lib/httpx/transcoder/utils/inflater.rb +0 -21
- data/sig/transcoder/utils/inflater.rbs +0 -12
@@ -5,7 +5,6 @@ module HTTPX
|
|
5
5
|
|
6
6
|
@body: BodyReader
|
7
7
|
@buffer: Response::Buffer?
|
8
|
-
@body: BodyReader
|
9
8
|
@closed: bool
|
10
9
|
|
11
10
|
attr_reader content_type: String
|
@@ -14,7 +13,7 @@ module HTTPX
|
|
14
13
|
|
15
14
|
def bytesize: () -> (Integer | Float)
|
16
15
|
|
17
|
-
def read: (?int? length, ?string outbuf) -> String?
|
16
|
+
def read: (?int? length, ?string? outbuf) -> String?
|
18
17
|
|
19
18
|
def close: () -> void
|
20
19
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: http-2
|
@@ -150,6 +149,10 @@ extra_rdoc_files:
|
|
150
149
|
- doc/release_notes/1_3_3.md
|
151
150
|
- doc/release_notes/1_3_4.md
|
152
151
|
- doc/release_notes/1_4_0.md
|
152
|
+
- doc/release_notes/1_4_1.md
|
153
|
+
- doc/release_notes/1_4_2.md
|
154
|
+
- doc/release_notes/1_4_3.md
|
155
|
+
- doc/release_notes/1_4_4.md
|
153
156
|
files:
|
154
157
|
- LICENSE.txt
|
155
158
|
- README.md
|
@@ -271,6 +274,10 @@ files:
|
|
271
274
|
- doc/release_notes/1_3_3.md
|
272
275
|
- doc/release_notes/1_3_4.md
|
273
276
|
- doc/release_notes/1_4_0.md
|
277
|
+
- doc/release_notes/1_4_1.md
|
278
|
+
- doc/release_notes/1_4_2.md
|
279
|
+
- doc/release_notes/1_4_3.md
|
280
|
+
- doc/release_notes/1_4_4.md
|
274
281
|
- lib/httpx.rb
|
275
282
|
- lib/httpx/adapters/datadog.rb
|
276
283
|
- lib/httpx/adapters/faraday.rb
|
@@ -359,7 +366,6 @@ files:
|
|
359
366
|
- lib/httpx/response/buffer.rb
|
360
367
|
- lib/httpx/selector.rb
|
361
368
|
- lib/httpx/session.rb
|
362
|
-
- lib/httpx/session2.rb
|
363
369
|
- lib/httpx/session_extensions.rb
|
364
370
|
- lib/httpx/timers.rb
|
365
371
|
- lib/httpx/transcoder.rb
|
@@ -376,7 +382,6 @@ files:
|
|
376
382
|
- lib/httpx/transcoder/multipart/part.rb
|
377
383
|
- lib/httpx/transcoder/utils/body_reader.rb
|
378
384
|
- lib/httpx/transcoder/utils/deflater.rb
|
379
|
-
- lib/httpx/transcoder/utils/inflater.rb
|
380
385
|
- lib/httpx/utils.rb
|
381
386
|
- lib/httpx/version.rb
|
382
387
|
- sig/altsvc.rbs
|
@@ -464,7 +469,6 @@ files:
|
|
464
469
|
- sig/transcoder/multipart.rbs
|
465
470
|
- sig/transcoder/utils/body_reader.rbs
|
466
471
|
- sig/transcoder/utils/deflater.rbs
|
467
|
-
- sig/transcoder/utils/inflater.rbs
|
468
472
|
- sig/utils.rbs
|
469
473
|
homepage: https://gitlab.com/os85/httpx
|
470
474
|
licenses:
|
@@ -476,7 +480,6 @@ metadata:
|
|
476
480
|
source_code_uri: https://gitlab.com/os85/httpx
|
477
481
|
homepage_uri: https://honeyryderchuck.gitlab.io/httpx/
|
478
482
|
rubygems_mfa_required: 'true'
|
479
|
-
post_install_message:
|
480
483
|
rdoc_options: []
|
481
484
|
require_paths:
|
482
485
|
- lib
|
@@ -491,8 +494,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
491
494
|
- !ruby/object:Gem::Version
|
492
495
|
version: '0'
|
493
496
|
requirements: []
|
494
|
-
rubygems_version: 3.
|
495
|
-
signing_key:
|
497
|
+
rubygems_version: 3.6.2
|
496
498
|
specification_version: 4
|
497
499
|
summary: HTTPX, to the future, and beyond
|
498
500
|
test_files: []
|
data/lib/httpx/session2.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "session"
|
4
|
-
module HTTPX
|
5
|
-
class Session
|
6
|
-
def initialize(options = EMPTY, &blk)
|
7
|
-
@options = self.class.default_options.merge(options)
|
8
|
-
@responses = {}
|
9
|
-
@persistent = @options.persistent
|
10
|
-
wrap(&blk) if blk
|
11
|
-
end
|
12
|
-
|
13
|
-
def wrap
|
14
|
-
begin
|
15
|
-
prev_persistent = @persistent
|
16
|
-
@persistent = true
|
17
|
-
yield self
|
18
|
-
ensure
|
19
|
-
@persistent = prev_persistent
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module HTTPX
|
4
|
-
module Transcoder
|
5
|
-
class Inflater
|
6
|
-
def initialize(bytesize)
|
7
|
-
@bytesize = bytesize
|
8
|
-
end
|
9
|
-
|
10
|
-
def call(chunk)
|
11
|
-
buffer = @inflater.inflate(chunk)
|
12
|
-
@bytesize -= chunk.bytesize
|
13
|
-
if @bytesize <= 0
|
14
|
-
buffer << @inflater.finish
|
15
|
-
@inflater.close
|
16
|
-
end
|
17
|
-
buffer
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|