httpx 1.7.5 → 1.7.7
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_7_4.md +1 -1
- data/doc/release_notes/1_7_6.md +24 -0
- data/doc/release_notes/1_7_7.md +17 -0
- data/lib/httpx/adapters/datadog.rb +14 -1
- data/lib/httpx/adapters/faraday.rb +0 -10
- data/lib/httpx/adapters/webmock.rb +1 -1
- data/lib/httpx/altsvc.rb +4 -2
- data/lib/httpx/connection/http1.rb +52 -43
- data/lib/httpx/connection/http2.rb +23 -16
- data/lib/httpx/connection.rb +80 -43
- data/lib/httpx/io/ssl.rb +24 -12
- data/lib/httpx/io/tcp.rb +18 -12
- data/lib/httpx/io/unix.rb +13 -9
- data/lib/httpx/loggable.rb +1 -1
- data/lib/httpx/options.rb +23 -7
- data/lib/httpx/parser/http1.rb +14 -5
- data/lib/httpx/plugins/auth/digest.rb +6 -0
- data/lib/httpx/plugins/auth.rb +23 -9
- data/lib/httpx/plugins/circuit_breaker/circuit.rb +1 -0
- data/lib/httpx/plugins/cookies/cookie.rb +0 -1
- data/lib/httpx/plugins/digest_auth.rb +3 -1
- data/lib/httpx/plugins/follow_redirects.rb +13 -1
- data/lib/httpx/plugins/h2c.rb +2 -12
- data/lib/httpx/plugins/proxy/http.rb +1 -1
- data/lib/httpx/plugins/proxy.rb +1 -1
- data/lib/httpx/plugins/response_cache.rb +11 -4
- data/lib/httpx/plugins/retries.rb +6 -6
- data/lib/httpx/plugins/ssrf_filter.rb +1 -1
- data/lib/httpx/plugins/tracing.rb +1 -6
- data/lib/httpx/plugins/upgrade/h2.rb +1 -11
- data/lib/httpx/plugins/upgrade.rb +17 -17
- data/lib/httpx/pool.rb +7 -9
- data/lib/httpx/request.rb +28 -3
- data/lib/httpx/resolver/native.rb +1 -1
- data/lib/httpx/response.rb +5 -1
- data/lib/httpx/selector.rb +18 -10
- data/lib/httpx/session.rb +32 -24
- data/lib/httpx/version.rb +1 -1
- data/sig/altsvc.rbs +2 -0
- data/sig/connection/http1.rbs +4 -2
- data/sig/connection/http2.rbs +1 -1
- data/sig/connection.rbs +9 -2
- data/sig/io/ssl.rbs +1 -0
- data/sig/io/tcp.rbs +2 -2
- data/sig/loggable.rbs +1 -1
- data/sig/options.rbs +8 -3
- data/sig/parser/http1.rbs +1 -1
- data/sig/plugins/auth/basic.rbs +1 -1
- data/sig/plugins/auth/digest.rbs +1 -1
- data/sig/plugins/auth/ntlm.rbs +2 -0
- data/sig/plugins/auth.rbs +5 -2
- data/sig/plugins/follow_redirects.rbs +1 -1
- data/sig/plugins/proxy.rbs +1 -0
- data/sig/plugins/response_cache.rbs +2 -0
- data/sig/plugins/retries.rbs +1 -1
- data/sig/plugins/tracing.rbs +1 -1
- data/sig/pool.rbs +1 -1
- data/sig/request.rbs +6 -0
- data/sig/session.rbs +0 -2
- metadata +5 -1
data/sig/io/ssl.rbs
CHANGED
data/sig/io/tcp.rbs
CHANGED
|
@@ -46,7 +46,7 @@ module HTTPX
|
|
|
46
46
|
|
|
47
47
|
public
|
|
48
48
|
|
|
49
|
-
def read: (Integer size,
|
|
49
|
+
def read: (Integer size, Buffer | String buffer) -> (0 | nil | untyped)
|
|
50
50
|
|
|
51
51
|
def write: (Buffer buffer) -> Integer?
|
|
52
52
|
|
|
@@ -67,6 +67,6 @@ module HTTPX
|
|
|
67
67
|
|
|
68
68
|
def do_transition: (Symbol nextstate) -> void
|
|
69
69
|
|
|
70
|
-
def log_transition_state: (Symbol nextstate) ->
|
|
70
|
+
def log_transition_state: (Symbol nextstate) -> String
|
|
71
71
|
end
|
|
72
72
|
end
|
data/sig/loggable.rbs
CHANGED
data/sig/options.rbs
CHANGED
|
@@ -17,6 +17,7 @@ module HTTPX
|
|
|
17
17
|
|
|
18
18
|
DEFAULT_OPTIONS: Hash[Symbol, untyped]
|
|
19
19
|
REQUEST_BODY_IVARS: Array[Symbol]
|
|
20
|
+
RESOLVER_IVARS: Array[Symbol]
|
|
20
21
|
RESOLVER_TYPES: Array[Symbol]
|
|
21
22
|
USER_AGENT: String
|
|
22
23
|
|
|
@@ -106,8 +107,10 @@ module HTTPX
|
|
|
106
107
|
|
|
107
108
|
attr_reader ssl: Hash[Symbol, untyped]
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
type external_io = TCPSocket | OpenSSL::SSL::SSLSocket | UNIXSocket
|
|
111
|
+
|
|
112
|
+
type io_option = external_io | Hash[String, external_io]
|
|
113
|
+
|
|
111
114
|
attr_reader io: io_option?
|
|
112
115
|
|
|
113
116
|
# fallback_protocol
|
|
@@ -142,7 +145,9 @@ module HTTPX
|
|
|
142
145
|
|
|
143
146
|
def ==: (Options other) -> bool
|
|
144
147
|
|
|
145
|
-
def
|
|
148
|
+
def connection_options_match?: (Options other, ?Array[Symbol] ignore_ivars) -> bool
|
|
149
|
+
|
|
150
|
+
def resolver_options_match?: (Options other) -> bool
|
|
146
151
|
|
|
147
152
|
def merge: (Object & _ToHash[Symbol, untyped] other) -> (instance | self)
|
|
148
153
|
|
data/sig/parser/http1.rbs
CHANGED
data/sig/plugins/auth/basic.rbs
CHANGED
data/sig/plugins/auth/digest.rbs
CHANGED
data/sig/plugins/auth/ntlm.rbs
CHANGED
data/sig/plugins/auth.rbs
CHANGED
|
@@ -10,7 +10,8 @@ module HTTPX
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
module InstanceMethods
|
|
13
|
-
@auth_header_value: String
|
|
13
|
+
@auth_header_value: String?
|
|
14
|
+
@auth_header_value_mtx: Thread::Mutex
|
|
14
15
|
@skip_auth_header_value: bool
|
|
15
16
|
|
|
16
17
|
def authorization: (?string token, ?auth_header_type: string) ?{ (Request) -> string } -> instance
|
|
@@ -29,7 +30,9 @@ module HTTPX
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
module RequestMethods
|
|
32
|
-
|
|
33
|
+
attr_reader auth_token_value: String?
|
|
34
|
+
|
|
35
|
+
@auth_header_value: String?
|
|
33
36
|
|
|
34
37
|
def authorized?: () -> bool
|
|
35
38
|
|
data/sig/plugins/proxy.rbs
CHANGED
data/sig/plugins/retries.rbs
CHANGED
|
@@ -47,7 +47,7 @@ module HTTPX
|
|
|
47
47
|
|
|
48
48
|
def prepare_to_retry: (Request & RequestMethods request, retriesResponse response) -> void
|
|
49
49
|
|
|
50
|
-
def when_to_retry: (Request & RequestMethods request, retriesResponse response, retriesOptions options) ->
|
|
50
|
+
def when_to_retry: (Request & RequestMethods request, retriesResponse response, retriesOptions options) -> Numeric?
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
module RequestMethods
|
data/sig/plugins/tracing.rbs
CHANGED
data/sig/pool.rbs
CHANGED
data/sig/request.rbs
CHANGED
|
@@ -18,6 +18,8 @@ module HTTPX
|
|
|
18
18
|
attr_reader drain_error: StandardError?
|
|
19
19
|
attr_reader active_timeouts: Array[Symbol]
|
|
20
20
|
|
|
21
|
+
attr_writer connection: Connection?
|
|
22
|
+
attr_writer on_response_arrived: (^() -> void)?
|
|
21
23
|
attr_accessor peer_address: (String | IPAddr)?
|
|
22
24
|
|
|
23
25
|
attr_writer persistent: bool
|
|
@@ -81,6 +83,10 @@ module HTTPX
|
|
|
81
83
|
|
|
82
84
|
def set_timeout_callback: (Symbol event) { (*untyped) -> void } -> void
|
|
83
85
|
|
|
86
|
+
def handle_error: (StandardError error) -> void
|
|
87
|
+
|
|
88
|
+
def emit_response: (response response) -> void
|
|
89
|
+
|
|
84
90
|
private
|
|
85
91
|
|
|
86
92
|
def initialize_body: (Options options) -> Transcoder::_Encoder?
|
data/sig/session.rbs
CHANGED
|
@@ -62,8 +62,6 @@ module HTTPX
|
|
|
62
62
|
|
|
63
63
|
def send_requests: (*Request) -> Array[response]
|
|
64
64
|
|
|
65
|
-
def _send_requests: (Array[Request] requests, Selector selector) -> void
|
|
66
|
-
|
|
67
65
|
def receive_requests: (Array[Request] requests, Selector selector) -> Array[response]
|
|
68
66
|
|
|
69
67
|
def early_resolve: (resolver resolver, Connection connection) -> bool
|
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.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Cardoso
|
|
@@ -165,6 +165,8 @@ extra_rdoc_files:
|
|
|
165
165
|
- doc/release_notes/1_7_3.md
|
|
166
166
|
- doc/release_notes/1_7_4.md
|
|
167
167
|
- doc/release_notes/1_7_5.md
|
|
168
|
+
- doc/release_notes/1_7_6.md
|
|
169
|
+
- doc/release_notes/1_7_7.md
|
|
168
170
|
files:
|
|
169
171
|
- LICENSE.txt
|
|
170
172
|
- README.md
|
|
@@ -302,6 +304,8 @@ files:
|
|
|
302
304
|
- doc/release_notes/1_7_3.md
|
|
303
305
|
- doc/release_notes/1_7_4.md
|
|
304
306
|
- doc/release_notes/1_7_5.md
|
|
307
|
+
- doc/release_notes/1_7_6.md
|
|
308
|
+
- doc/release_notes/1_7_7.md
|
|
305
309
|
- lib/httpx.rb
|
|
306
310
|
- lib/httpx/adapters/datadog.rb
|
|
307
311
|
- lib/httpx/adapters/faraday.rb
|