httpx 1.7.4 → 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/doc/release_notes/1_7_4.md +1 -1
- 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 +15 -6
- data/lib/httpx/altsvc.rb +4 -2
- data/lib/httpx/connection/http1.rb +20 -17
- data/lib/httpx/connection/http2.rb +10 -3
- data/lib/httpx/connection.rb +78 -41
- 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.rb +23 -9
- data/lib/httpx/plugins/expect.rb +3 -0
- data/lib/httpx/plugins/retries.rb +1 -1
- data/lib/httpx/plugins/tracing.rb +4 -4
- data/lib/httpx/pool.rb +7 -9
- data/lib/httpx/request.rb +15 -3
- data/lib/httpx/resolver/native.rb +1 -1
- data/lib/httpx/response.rb +5 -1
- data/lib/httpx/selector.rb +15 -12
- data/lib/httpx/session.rb +24 -39
- data/lib/httpx/timers.rb +4 -0
- data/lib/httpx/version.rb +1 -1
- data/sig/altsvc.rbs +2 -0
- data/sig/connection/http1.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/options.rbs +8 -3
- data/sig/parser/http1.rbs +1 -1
- data/sig/plugins/auth.rbs +5 -2
- data/sig/plugins/expect.rbs +4 -0
- data/sig/plugins/fiber_concurrency.rbs +2 -2
- data/sig/plugins/retries.rbs +1 -1
- data/sig/pool.rbs +1 -1
- data/sig/request.rbs +3 -0
- data/sig/selector.rbs +3 -2
- data/sig/timers.rbs +2 -0
- metadata +5 -1
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.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/expect.rbs
CHANGED
|
@@ -9,12 +9,12 @@ module HTTPX
|
|
|
9
9
|
|
|
10
10
|
def set_context!: () -> void
|
|
11
11
|
|
|
12
|
-
def current_context?: () ->
|
|
12
|
+
def current_context?: () -> boolish
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
module ConnectionMethods
|
|
16
16
|
|
|
17
|
-
def current_context?: () ->
|
|
17
|
+
def current_context?: () -> boolish
|
|
18
18
|
|
|
19
19
|
def send: (request request) -> void
|
|
20
20
|
end
|
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/pool.rbs
CHANGED
data/sig/request.rbs
CHANGED
|
@@ -18,6 +18,7 @@ module HTTPX
|
|
|
18
18
|
attr_reader drain_error: StandardError?
|
|
19
19
|
attr_reader active_timeouts: Array[Symbol]
|
|
20
20
|
|
|
21
|
+
attr_writer connection: Connection?
|
|
21
22
|
attr_accessor peer_address: (String | IPAddr)?
|
|
22
23
|
|
|
23
24
|
attr_writer persistent: bool
|
|
@@ -81,6 +82,8 @@ module HTTPX
|
|
|
81
82
|
|
|
82
83
|
def set_timeout_callback: (Symbol event) { (*untyped) -> void } -> void
|
|
83
84
|
|
|
85
|
+
def handle_error: (StandardError error) -> void
|
|
86
|
+
|
|
84
87
|
private
|
|
85
88
|
|
|
86
89
|
def initialize_body: (Options options) -> Transcoder::_Encoder?
|
data/sig/selector.rbs
CHANGED
|
@@ -24,8 +24,6 @@ module HTTPX
|
|
|
24
24
|
|
|
25
25
|
type io_select_selectable = (selectable | Array[selectable])?
|
|
26
26
|
|
|
27
|
-
include _Each[selectable]
|
|
28
|
-
|
|
29
27
|
extend Forwardable
|
|
30
28
|
|
|
31
29
|
READABLE: Array[io_interests]
|
|
@@ -36,6 +34,9 @@ module HTTPX
|
|
|
36
34
|
@selectables: Array[selectable]
|
|
37
35
|
@is_timer_interval: bool
|
|
38
36
|
|
|
37
|
+
def each: () -> ::Enumerator[selectable, self]
|
|
38
|
+
| () { (selectable) -> void } -> self
|
|
39
|
+
|
|
39
40
|
def next_tick: () -> void
|
|
40
41
|
|
|
41
42
|
def terminate: () -> void
|
data/sig/timers.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
|
|
@@ -164,6 +164,8 @@ extra_rdoc_files:
|
|
|
164
164
|
- doc/release_notes/1_7_2.md
|
|
165
165
|
- doc/release_notes/1_7_3.md
|
|
166
166
|
- doc/release_notes/1_7_4.md
|
|
167
|
+
- doc/release_notes/1_7_5.md
|
|
168
|
+
- doc/release_notes/1_7_6.md
|
|
167
169
|
files:
|
|
168
170
|
- LICENSE.txt
|
|
169
171
|
- README.md
|
|
@@ -300,6 +302,8 @@ files:
|
|
|
300
302
|
- doc/release_notes/1_7_2.md
|
|
301
303
|
- doc/release_notes/1_7_3.md
|
|
302
304
|
- doc/release_notes/1_7_4.md
|
|
305
|
+
- doc/release_notes/1_7_5.md
|
|
306
|
+
- doc/release_notes/1_7_6.md
|
|
303
307
|
- lib/httpx.rb
|
|
304
308
|
- lib/httpx/adapters/datadog.rb
|
|
305
309
|
- lib/httpx/adapters/faraday.rb
|