httpx 1.7.2 → 1.7.6
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 +3 -1
- data/doc/release_notes/1_7_3.md +29 -0
- data/doc/release_notes/1_7_4.md +42 -0
- data/doc/release_notes/1_7_5.md +10 -0
- data/doc/release_notes/1_7_6.md +24 -0
- data/lib/httpx/adapters/datadog.rb +37 -64
- data/lib/httpx/adapters/webmock.rb +3 -4
- data/lib/httpx/altsvc.rb +4 -2
- data/lib/httpx/connection/http1.rb +26 -18
- data/lib/httpx/connection/http2.rb +53 -33
- data/lib/httpx/connection.rb +152 -63
- data/lib/httpx/io/ssl.rb +20 -8
- data/lib/httpx/io/tcp.rb +18 -12
- data/lib/httpx/io/unix.rb +13 -9
- data/lib/httpx/options.rb +23 -7
- data/lib/httpx/parser/http1.rb +14 -4
- data/lib/httpx/plugins/auth/digest.rb +2 -1
- data/lib/httpx/plugins/auth.rb +23 -9
- data/lib/httpx/plugins/brotli.rb +33 -5
- data/lib/httpx/plugins/cookies/cookie.rb +34 -11
- data/lib/httpx/plugins/cookies/jar.rb +93 -18
- data/lib/httpx/plugins/cookies.rb +7 -3
- data/lib/httpx/plugins/expect.rb +33 -3
- data/lib/httpx/plugins/fiber_concurrency.rb +2 -4
- data/lib/httpx/plugins/follow_redirects.rb +7 -1
- data/lib/httpx/plugins/h2c.rb +1 -1
- data/lib/httpx/plugins/proxy/http.rb +15 -8
- data/lib/httpx/plugins/proxy.rb +10 -2
- data/lib/httpx/plugins/rate_limiter.rb +19 -19
- data/lib/httpx/plugins/retries.rb +17 -9
- data/lib/httpx/plugins/ssrf_filter.rb +1 -0
- data/lib/httpx/plugins/stream_bidi.rb +6 -0
- data/lib/httpx/plugins/tracing.rb +137 -0
- data/lib/httpx/pool.rb +7 -9
- data/lib/httpx/request.rb +15 -3
- data/lib/httpx/resolver/multi.rb +1 -8
- data/lib/httpx/resolver/native.rb +2 -2
- data/lib/httpx/resolver/resolver.rb +21 -2
- data/lib/httpx/resolver/system.rb +3 -1
- data/lib/httpx/response.rb +5 -1
- data/lib/httpx/selector.rb +19 -16
- data/lib/httpx/session.rb +34 -44
- data/lib/httpx/timers.rb +4 -0
- data/lib/httpx/version.rb +1 -1
- data/sig/altsvc.rbs +2 -0
- data/sig/chainable.rbs +2 -1
- data/sig/connection/http1.rbs +3 -1
- data/sig/connection/http2.rbs +11 -4
- data/sig/connection.rbs +16 -2
- data/sig/io/ssl.rbs +1 -0
- data/sig/io/tcp.rbs +2 -2
- data/sig/options.rbs +8 -3
- data/sig/parser/http1.rbs +1 -1
- data/sig/plugins/auth.rbs +5 -2
- data/sig/plugins/brotli.rbs +11 -6
- data/sig/plugins/cookies/cookie.rbs +3 -2
- data/sig/plugins/cookies/jar.rbs +11 -0
- data/sig/plugins/cookies.rbs +2 -0
- data/sig/plugins/expect.rbs +21 -2
- data/sig/plugins/fiber_concurrency.rbs +2 -2
- data/sig/plugins/proxy/socks4.rbs +4 -0
- data/sig/plugins/rate_limiter.rbs +2 -2
- data/sig/plugins/response_cache.rbs +3 -3
- data/sig/plugins/retries.rbs +17 -13
- data/sig/plugins/tracing.rbs +41 -0
- data/sig/pool.rbs +1 -1
- data/sig/request.rbs +4 -0
- data/sig/resolver/native.rbs +2 -0
- data/sig/resolver/resolver.rbs +4 -2
- data/sig/resolver/system.rbs +0 -2
- data/sig/response/body.rbs +1 -1
- data/sig/selector.rbs +7 -2
- data/sig/session.rbs +2 -0
- data/sig/timers.rbs +2 -0
- data/sig/transcoder/gzip.rbs +1 -1
- data/sig/transcoder.rbs +0 -2
- metadata +13 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Tracing
|
|
4
|
+
interface _Tracer
|
|
5
|
+
def enabled?: (retriesRequest request) -> boolish
|
|
6
|
+
|
|
7
|
+
def start: (retriesRequest request) -> void
|
|
8
|
+
|
|
9
|
+
def reset: (retriesRequest request) -> void
|
|
10
|
+
|
|
11
|
+
def finish: (retriesRequest request, response response) -> void
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class Wrapper
|
|
15
|
+
include _Tracer
|
|
16
|
+
|
|
17
|
+
attr_reader tracers: Array[_Tracer]
|
|
18
|
+
|
|
19
|
+
def initialize: (*_Tracer tracers) -> void
|
|
20
|
+
|
|
21
|
+
def merge: (instance | _Tracer) -> void
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
interface _RetriesOptions
|
|
25
|
+
def tracer: () -> _Tracer
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
module RequestMethods
|
|
29
|
+
attr_accessor init_time: Time?
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
module ConnectionMethods
|
|
33
|
+
@init_time: Time
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
type retriesRequest = Request & RequestMethods
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
type sessionTracing = Session
|
|
40
|
+
end
|
|
41
|
+
end
|
data/sig/pool.rbs
CHANGED
data/sig/request.rbs
CHANGED
|
@@ -6,6 +6,7 @@ module HTTPX
|
|
|
6
6
|
|
|
7
7
|
METHODS: Array[Symbol]
|
|
8
8
|
USER_AGENT: String
|
|
9
|
+
ALLOWED_URI_SCHEMES: Array[String]
|
|
9
10
|
|
|
10
11
|
attr_reader verb: verb
|
|
11
12
|
attr_reader uri: http_uri
|
|
@@ -17,6 +18,7 @@ module HTTPX
|
|
|
17
18
|
attr_reader drain_error: StandardError?
|
|
18
19
|
attr_reader active_timeouts: Array[Symbol]
|
|
19
20
|
|
|
21
|
+
attr_writer connection: Connection?
|
|
20
22
|
attr_accessor peer_address: (String | IPAddr)?
|
|
21
23
|
|
|
22
24
|
attr_writer persistent: bool
|
|
@@ -80,6 +82,8 @@ module HTTPX
|
|
|
80
82
|
|
|
81
83
|
def set_timeout_callback: (Symbol event) { (*untyped) -> void } -> void
|
|
82
84
|
|
|
85
|
+
def handle_error: (StandardError error) -> void
|
|
86
|
+
|
|
83
87
|
private
|
|
84
88
|
|
|
85
89
|
def initialize_body: (Options options) -> Transcoder::_Encoder?
|
data/sig/resolver/native.rbs
CHANGED
data/sig/resolver/resolver.rbs
CHANGED
|
@@ -27,8 +27,6 @@ module HTTPX
|
|
|
27
27
|
|
|
28
28
|
def terminate: () -> void
|
|
29
29
|
|
|
30
|
-
def force_close: (*untyped args) -> void
|
|
31
|
-
|
|
32
30
|
def closed?: () -> bool
|
|
33
31
|
|
|
34
32
|
def empty?: () -> bool
|
|
@@ -43,6 +41,8 @@ module HTTPX
|
|
|
43
41
|
|
|
44
42
|
def early_resolve: (Connection connection, ?hostname: String) -> bool
|
|
45
43
|
|
|
44
|
+
def lazy_resolve: (Connection connection) -> void
|
|
45
|
+
|
|
46
46
|
private
|
|
47
47
|
|
|
48
48
|
def resolve: (?Connection connection, ?String hostname) -> void
|
|
@@ -60,6 +60,8 @@ module HTTPX
|
|
|
60
60
|
def resolve_error: (String hostname, ?StandardError?) -> (ResolveError | ResolveTimeoutError)
|
|
61
61
|
|
|
62
62
|
def close_or_resolve: () -> void
|
|
63
|
+
|
|
64
|
+
def disconnect: () -> void
|
|
63
65
|
end
|
|
64
66
|
end
|
|
65
67
|
end
|
data/sig/resolver/system.rbs
CHANGED
data/sig/response/body.rbs
CHANGED
|
@@ -43,7 +43,7 @@ module HTTPX
|
|
|
43
43
|
|
|
44
44
|
def initialize_inflaters: () -> void
|
|
45
45
|
|
|
46
|
-
def self.initialize_inflater_by_encoding: (Encoding | String encoding, Response response, ?bytesize: Integer) -> Transcoder::
|
|
46
|
+
def self.initialize_inflater_by_encoding: (Encoding | String encoding, Response response, ?bytesize: Integer) -> (Object & Transcoder::_Inflater)
|
|
47
47
|
|
|
48
48
|
def decode_chunk: (String chunk) -> String
|
|
49
49
|
|
data/sig/selector.rbs
CHANGED
|
@@ -13,6 +13,10 @@ module HTTPX
|
|
|
13
13
|
def handle_socket_timeout: (Numeric interval) -> void
|
|
14
14
|
|
|
15
15
|
def on_error: (StandardError) -> void
|
|
16
|
+
|
|
17
|
+
def on_io_error: (IOError error) -> void
|
|
18
|
+
|
|
19
|
+
def force_close: (?bool delete_pending) -> void
|
|
16
20
|
end
|
|
17
21
|
|
|
18
22
|
class Selector
|
|
@@ -20,8 +24,6 @@ module HTTPX
|
|
|
20
24
|
|
|
21
25
|
type io_select_selectable = (selectable | Array[selectable])?
|
|
22
26
|
|
|
23
|
-
include _Each[selectable]
|
|
24
|
-
|
|
25
27
|
extend Forwardable
|
|
26
28
|
|
|
27
29
|
READABLE: Array[io_interests]
|
|
@@ -32,6 +34,9 @@ module HTTPX
|
|
|
32
34
|
@selectables: Array[selectable]
|
|
33
35
|
@is_timer_interval: bool
|
|
34
36
|
|
|
37
|
+
def each: () -> ::Enumerator[selectable, self]
|
|
38
|
+
| () { (selectable) -> void } -> self
|
|
39
|
+
|
|
35
40
|
def next_tick: () -> void
|
|
36
41
|
|
|
37
42
|
def terminate: () -> void
|
data/sig/session.rbs
CHANGED
|
@@ -66,6 +66,8 @@ module HTTPX
|
|
|
66
66
|
|
|
67
67
|
def receive_requests: (Array[Request] requests, Selector selector) -> Array[response]
|
|
68
68
|
|
|
69
|
+
def early_resolve: (resolver resolver, Connection connection) -> bool
|
|
70
|
+
|
|
69
71
|
def resolve_connection: (Connection connection, Selector selector) -> void
|
|
70
72
|
|
|
71
73
|
def on_resolver_connection: (Connection connection, Selector selector) -> void
|
data/sig/timers.rbs
CHANGED
data/sig/transcoder/gzip.rbs
CHANGED
data/sig/transcoder.rbs
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: httpx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Cardoso
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 1.
|
|
18
|
+
version: 1.1.3
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 1.
|
|
25
|
+
version: 1.1.3
|
|
26
26
|
description: A client library for making HTTP requests from Ruby.
|
|
27
27
|
email:
|
|
28
28
|
- cardoso_tiago@hotmail.com
|
|
@@ -162,6 +162,10 @@ extra_rdoc_files:
|
|
|
162
162
|
- doc/release_notes/1_7_0.md
|
|
163
163
|
- doc/release_notes/1_7_1.md
|
|
164
164
|
- doc/release_notes/1_7_2.md
|
|
165
|
+
- doc/release_notes/1_7_3.md
|
|
166
|
+
- doc/release_notes/1_7_4.md
|
|
167
|
+
- doc/release_notes/1_7_5.md
|
|
168
|
+
- doc/release_notes/1_7_6.md
|
|
165
169
|
files:
|
|
166
170
|
- LICENSE.txt
|
|
167
171
|
- README.md
|
|
@@ -296,6 +300,10 @@ files:
|
|
|
296
300
|
- doc/release_notes/1_7_0.md
|
|
297
301
|
- doc/release_notes/1_7_1.md
|
|
298
302
|
- doc/release_notes/1_7_2.md
|
|
303
|
+
- doc/release_notes/1_7_3.md
|
|
304
|
+
- doc/release_notes/1_7_4.md
|
|
305
|
+
- doc/release_notes/1_7_5.md
|
|
306
|
+
- doc/release_notes/1_7_6.md
|
|
299
307
|
- lib/httpx.rb
|
|
300
308
|
- lib/httpx/adapters/datadog.rb
|
|
301
309
|
- lib/httpx/adapters/faraday.rb
|
|
@@ -367,6 +375,7 @@ files:
|
|
|
367
375
|
- lib/httpx/plugins/ssrf_filter.rb
|
|
368
376
|
- lib/httpx/plugins/stream.rb
|
|
369
377
|
- lib/httpx/plugins/stream_bidi.rb
|
|
378
|
+
- lib/httpx/plugins/tracing.rb
|
|
370
379
|
- lib/httpx/plugins/upgrade.rb
|
|
371
380
|
- lib/httpx/plugins/upgrade/h2.rb
|
|
372
381
|
- lib/httpx/plugins/webdav.rb
|
|
@@ -472,6 +481,7 @@ files:
|
|
|
472
481
|
- sig/plugins/ssrf_filter.rbs
|
|
473
482
|
- sig/plugins/stream.rbs
|
|
474
483
|
- sig/plugins/stream_bidi.rbs
|
|
484
|
+
- sig/plugins/tracing.rbs
|
|
475
485
|
- sig/plugins/upgrade.rbs
|
|
476
486
|
- sig/plugins/upgrade/h2.rbs
|
|
477
487
|
- sig/plugins/webdav.rbs
|