httpx 1.6.1 → 1.6.3
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/doc/release_notes/1_6_2.md +11 -0
- data/doc/release_notes/1_6_3.md +47 -0
- data/lib/httpx/adapters/datadog.rb +15 -11
- data/lib/httpx/adapters/sentry.rb +1 -1
- data/lib/httpx/connection/http1.rb +9 -9
- data/lib/httpx/connection/http2.rb +14 -15
- data/lib/httpx/connection.rb +119 -102
- data/lib/httpx/extensions.rb +0 -14
- data/lib/httpx/io/ssl.rb +1 -1
- data/lib/httpx/loggable.rb +12 -2
- data/lib/httpx/options.rb +20 -0
- data/lib/httpx/plugins/callbacks.rb +15 -1
- data/lib/httpx/plugins/digest_auth.rb +1 -1
- data/lib/httpx/plugins/proxy/http.rb +37 -9
- data/lib/httpx/plugins/response_cache/file_store.rb +1 -0
- data/lib/httpx/plugins/response_cache.rb +13 -2
- data/lib/httpx/plugins/stream_bidi.rb +15 -6
- data/lib/httpx/pool.rb +53 -19
- data/lib/httpx/request.rb +3 -13
- data/lib/httpx/resolver/https.rb +35 -19
- data/lib/httpx/resolver/multi.rb +9 -32
- data/lib/httpx/resolver/native.rb +46 -38
- data/lib/httpx/resolver/resolver.rb +45 -28
- data/lib/httpx/resolver/system.rb +63 -39
- data/lib/httpx/selector.rb +35 -20
- data/lib/httpx/session.rb +18 -28
- data/lib/httpx/transcoder/deflate.rb +13 -8
- data/lib/httpx/transcoder/utils/body_reader.rb +1 -2
- data/lib/httpx/transcoder/utils/deflater.rb +1 -2
- data/lib/httpx/version.rb +1 -1
- data/sig/connection.rbs +12 -3
- data/sig/loggable.rbs +5 -1
- data/sig/options.rbs +5 -1
- data/sig/plugins/callbacks.rbs +3 -0
- data/sig/plugins/stream_bidi.rbs +3 -5
- data/sig/resolver/https.rbs +2 -0
- data/sig/resolver/multi.rbs +0 -9
- data/sig/resolver/native.rbs +0 -2
- data/sig/resolver/resolver.rbs +9 -8
- data/sig/resolver/system.rbs +4 -2
- data/sig/selector.rbs +2 -0
- data/sig/session.rbs +5 -3
- metadata +5 -1
data/sig/plugins/stream_bidi.rbs
CHANGED
|
@@ -5,7 +5,7 @@ module HTTPX
|
|
|
5
5
|
|
|
6
6
|
def self.extra_options: (Options) -> (Options)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
module HTTP2Methods
|
|
9
9
|
@lock: Thread::Mutex
|
|
10
10
|
|
|
11
11
|
private
|
|
@@ -24,6 +24,8 @@ module HTTPX
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
class Signal
|
|
27
|
+
attr_reader error: Exception?
|
|
28
|
+
|
|
27
29
|
@closed: bool
|
|
28
30
|
@pipe_read: IO
|
|
29
31
|
@pipe_write: IO
|
|
@@ -55,10 +57,6 @@ module HTTPX
|
|
|
55
57
|
|
|
56
58
|
module ConnectionMethods
|
|
57
59
|
@write_buffer: BidiBuffer
|
|
58
|
-
|
|
59
|
-
private
|
|
60
|
-
|
|
61
|
-
def parser_type: (String protocol) -> (singleton(Connection::HTTP1) | singleton(Connection::HTTP2) | singleton(HTTP2Bidi))
|
|
62
60
|
end
|
|
63
61
|
|
|
64
62
|
end
|
data/sig/resolver/https.rbs
CHANGED
data/sig/resolver/multi.rbs
CHANGED
|
@@ -8,7 +8,6 @@ module HTTPX
|
|
|
8
8
|
@current_selector: Selector?
|
|
9
9
|
@current_session: Session?
|
|
10
10
|
@resolver_options: Hash[Symbol, untyped]
|
|
11
|
-
# @errors: Hash[Symbol, untyped]
|
|
12
11
|
|
|
13
12
|
def current_selector=: (Selector s) -> void
|
|
14
13
|
|
|
@@ -16,14 +15,6 @@ module HTTPX
|
|
|
16
15
|
|
|
17
16
|
def closed?: () -> bool
|
|
18
17
|
|
|
19
|
-
def empty?: () -> bool
|
|
20
|
-
|
|
21
|
-
def timeout: () -> Numeric?
|
|
22
|
-
|
|
23
|
-
def close: () -> void
|
|
24
|
-
|
|
25
|
-
def connections: () -> Array[Connection]
|
|
26
|
-
|
|
27
18
|
def early_resolve: (Connection connection) -> bool
|
|
28
19
|
|
|
29
20
|
def lazy_resolve: (Connection connection) -> void
|
data/sig/resolver/native.rbs
CHANGED
|
@@ -64,8 +64,6 @@ module HTTPX
|
|
|
64
64
|
|
|
65
65
|
def transition: (Symbol nextstate) -> void
|
|
66
66
|
|
|
67
|
-
def handle_error: (NativeResolveError | StandardError) -> void
|
|
68
|
-
|
|
69
67
|
def reset_hostname: (String hostname, ?connection: Connection, ?reset_candidates: bool) -> void
|
|
70
68
|
|
|
71
69
|
def close_or_resolve: () -> void
|
data/sig/resolver/resolver.rbs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module HTTPX
|
|
2
2
|
module Resolver
|
|
3
3
|
class Resolver
|
|
4
|
-
include Callbacks
|
|
5
4
|
include Loggable
|
|
6
5
|
|
|
7
6
|
include _Selectable
|
|
@@ -26,7 +25,9 @@ module HTTPX
|
|
|
26
25
|
|
|
27
26
|
def close: () -> void
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
def terminate: () -> void
|
|
29
|
+
|
|
30
|
+
def force_close: (*untyped args) -> void
|
|
30
31
|
|
|
31
32
|
def closed?: () -> bool
|
|
32
33
|
|
|
@@ -36,8 +37,12 @@ module HTTPX
|
|
|
36
37
|
|
|
37
38
|
def emit_addresses: (Connection connection, ip_family family, Array[ipaddr], ?bool early_resolve) -> void
|
|
38
39
|
|
|
40
|
+
def handle_error: (ResolveError | StandardError) -> void
|
|
41
|
+
|
|
39
42
|
def self.multi?: () -> bool
|
|
40
43
|
|
|
44
|
+
def early_resolve: (Connection connection, ?hostname: String) -> bool
|
|
45
|
+
|
|
41
46
|
private
|
|
42
47
|
|
|
43
48
|
def resolve: (?Connection connection, ?String hostname) -> void
|
|
@@ -46,19 +51,15 @@ module HTTPX
|
|
|
46
51
|
|
|
47
52
|
def initialize: (ip_family family, Options options) -> void
|
|
48
53
|
|
|
49
|
-
def early_resolve: (Connection connection, ?hostname: String) -> bool
|
|
50
|
-
|
|
51
|
-
def set_resolver_callbacks: () -> void
|
|
52
|
-
|
|
53
54
|
def resolve_connection: (Connection connection) -> void
|
|
54
55
|
|
|
55
56
|
def emit_connection_error: (Connection connection, StandardError error) -> void
|
|
56
57
|
|
|
57
|
-
def close_resolver: (Resolver resolver) -> void
|
|
58
|
-
|
|
59
58
|
def emit_resolve_error: (Connection connection, ?String hostname, ?StandardError) -> void
|
|
60
59
|
|
|
61
60
|
def resolve_error: (String hostname, ?StandardError?) -> (ResolveError | ResolveTimeoutError)
|
|
61
|
+
|
|
62
|
+
def close_or_resolve: () -> void
|
|
62
63
|
end
|
|
63
64
|
end
|
|
64
65
|
end
|
data/sig/resolver/system.rbs
CHANGED
|
@@ -16,7 +16,9 @@ module HTTPX
|
|
|
16
16
|
|
|
17
17
|
attr_reader state: Symbol
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def initialize: (Options options) -> void
|
|
20
|
+
|
|
21
|
+
def lazy_resolve: (Connection connection) -> void
|
|
20
22
|
|
|
21
23
|
private
|
|
22
24
|
|
|
@@ -28,7 +30,7 @@ module HTTPX
|
|
|
28
30
|
|
|
29
31
|
def __addrinfo_resolve: (String host, String scheme) -> Array[Addrinfo]
|
|
30
32
|
|
|
31
|
-
def
|
|
33
|
+
def close_or_resolve: () -> void
|
|
32
34
|
end
|
|
33
35
|
end
|
|
34
36
|
end
|
data/sig/selector.rbs
CHANGED
data/sig/session.rbs
CHANGED
|
@@ -15,6 +15,8 @@ module HTTPX
|
|
|
15
15
|
@wrapped: bool
|
|
16
16
|
@closing: bool
|
|
17
17
|
|
|
18
|
+
type resolver = Resolver::Multi | Resolver::Resolver
|
|
19
|
+
|
|
18
20
|
def wrap: () { (instance) -> void } -> void
|
|
19
21
|
|
|
20
22
|
def close: (?Selector selector) -> void
|
|
@@ -23,11 +25,11 @@ module HTTPX
|
|
|
23
25
|
|
|
24
26
|
def select_connection: (Connection connection, Selector selector) -> void
|
|
25
27
|
|
|
26
|
-
def
|
|
28
|
+
def pin: (resolver | Connection conn_or_resolver, Selector selector) -> void
|
|
27
29
|
|
|
28
30
|
def deselect_connection: (Connection connection, Selector selector, ?bool cloned) -> void
|
|
29
31
|
|
|
30
|
-
def select_resolver: (Resolver::
|
|
32
|
+
def select_resolver: (Resolver::Resolver resolver, Selector selector) -> void
|
|
31
33
|
|
|
32
34
|
def deselect_resolver: (Resolver::Resolver resolver, Selector selector) -> void
|
|
33
35
|
|
|
@@ -72,7 +74,7 @@ module HTTPX
|
|
|
72
74
|
|
|
73
75
|
def on_resolver_close: (Resolver::Resolver resolver, Selector selector) -> void
|
|
74
76
|
|
|
75
|
-
def find_resolver_for: (Connection connection, Selector selector) ->
|
|
77
|
+
def find_resolver_for: (Connection connection, Selector selector) -> resolver
|
|
76
78
|
|
|
77
79
|
def coalesce_connections: (Connection conn1, Connection conn2, Selector selector, bool from_pool) -> bool
|
|
78
80
|
|
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.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Cardoso
|
|
@@ -157,6 +157,8 @@ extra_rdoc_files:
|
|
|
157
157
|
- doc/release_notes/1_5_1.md
|
|
158
158
|
- doc/release_notes/1_6_0.md
|
|
159
159
|
- doc/release_notes/1_6_1.md
|
|
160
|
+
- doc/release_notes/1_6_2.md
|
|
161
|
+
- doc/release_notes/1_6_3.md
|
|
160
162
|
files:
|
|
161
163
|
- LICENSE.txt
|
|
162
164
|
- README.md
|
|
@@ -286,6 +288,8 @@ files:
|
|
|
286
288
|
- doc/release_notes/1_5_1.md
|
|
287
289
|
- doc/release_notes/1_6_0.md
|
|
288
290
|
- doc/release_notes/1_6_1.md
|
|
291
|
+
- doc/release_notes/1_6_2.md
|
|
292
|
+
- doc/release_notes/1_6_3.md
|
|
289
293
|
- lib/httpx.rb
|
|
290
294
|
- lib/httpx/adapters/datadog.rb
|
|
291
295
|
- lib/httpx/adapters/faraday.rb
|