httpx 1.0.2 → 1.1.1
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 +2 -2
- data/doc/release_notes/1_1_0.md +32 -0
- data/doc/release_notes/1_1_1.md +17 -0
- data/lib/httpx/adapters/faraday.rb +28 -19
- data/lib/httpx/connection/http1.rb +13 -6
- data/lib/httpx/connection/http2.rb +1 -1
- data/lib/httpx/connection.rb +53 -15
- data/lib/httpx/domain_name.rb +6 -2
- data/lib/httpx/errors.rb +32 -0
- data/lib/httpx/io/ssl.rb +3 -1
- data/lib/httpx/io/tcp.rb +4 -2
- data/lib/httpx/io.rb +5 -1
- data/lib/httpx/options.rb +48 -1
- data/lib/httpx/plugins/expect.rb +10 -8
- data/lib/httpx/plugins/proxy/http.rb +0 -1
- data/lib/httpx/pool.rb +0 -4
- data/lib/httpx/request/body.rb +22 -9
- data/lib/httpx/request.rb +63 -4
- data/lib/httpx/resolver/native.rb +2 -2
- data/lib/httpx/resolver/resolver.rb +5 -2
- data/lib/httpx/resolver/system.rb +5 -2
- data/lib/httpx/resolver.rb +6 -4
- data/lib/httpx/response/body.rb +30 -5
- data/lib/httpx/response/buffer.rb +20 -14
- data/lib/httpx/response.rb +95 -16
- data/lib/httpx/selector.rb +2 -2
- data/lib/httpx/session.rb +64 -2
- data/lib/httpx/timers.rb +35 -8
- data/lib/httpx/transcoder/json.rb +1 -1
- data/lib/httpx/transcoder/utils/inflater.rb +19 -0
- data/lib/httpx/version.rb +1 -1
- data/sig/connection/http1.rbs +3 -3
- data/sig/connection/http2.rbs +1 -1
- data/sig/connection.rbs +4 -1
- data/sig/io/tcp.rbs +1 -1
- data/sig/options.rbs +2 -2
- data/sig/pool.rbs +1 -1
- data/sig/request/body.rbs +0 -2
- data/sig/request.rbs +9 -3
- data/sig/resolver/native.rbs +1 -1
- data/sig/resolver.rbs +1 -1
- data/sig/response/body.rbs +0 -1
- data/sig/response.rbs +11 -3
- data/sig/timers.rbs +17 -7
- data/sig/transcoder/utils/inflater.rbs +12 -0
- metadata +8 -2
data/sig/request.rbs
CHANGED
|
@@ -15,6 +15,10 @@ module HTTPX
|
|
|
15
15
|
attr_reader response: response?
|
|
16
16
|
attr_reader drain_error: StandardError?
|
|
17
17
|
|
|
18
|
+
attr_accessor peer_address: ipaddr?
|
|
19
|
+
|
|
20
|
+
attr_writer persistent: bool
|
|
21
|
+
|
|
18
22
|
@trailers: Headers?
|
|
19
23
|
@informational_status: Integer?
|
|
20
24
|
@query: String?
|
|
@@ -50,11 +54,13 @@ module HTTPX
|
|
|
50
54
|
|
|
51
55
|
def trailers?: () -> boolish
|
|
52
56
|
|
|
53
|
-
def
|
|
57
|
+
def persistent?: () -> bool
|
|
58
|
+
|
|
59
|
+
def read_timeout: () -> Numeric?
|
|
54
60
|
|
|
55
|
-
def write_timeout: () -> Numeric
|
|
61
|
+
def write_timeout: () -> Numeric?
|
|
56
62
|
|
|
57
|
-
def request_timeout: () -> Numeric
|
|
63
|
+
def request_timeout: () -> Numeric?
|
|
58
64
|
|
|
59
65
|
private
|
|
60
66
|
|
data/sig/resolver/native.rbs
CHANGED
data/sig/resolver.rbs
CHANGED
data/sig/response/body.rbs
CHANGED
data/sig/response.rbs
CHANGED
|
@@ -25,22 +25,28 @@ module HTTPX
|
|
|
25
25
|
@content_type: ContentType
|
|
26
26
|
|
|
27
27
|
def copy_to: (_ToPath | _Writer destination) -> void
|
|
28
|
+
|
|
28
29
|
def close: () -> void
|
|
30
|
+
|
|
29
31
|
def uri: () -> URI::Generic
|
|
30
32
|
|
|
33
|
+
def peer_address: () -> ipaddr?
|
|
34
|
+
|
|
31
35
|
def merge_headers: (_Each[[String, headers_value]]) -> void
|
|
36
|
+
|
|
32
37
|
def bodyless?: () -> bool
|
|
38
|
+
|
|
33
39
|
def content_type: () -> ContentType
|
|
40
|
+
|
|
34
41
|
def complete?: () -> bool
|
|
35
42
|
|
|
36
43
|
def json: (?json_options opts) -> untyped
|
|
37
44
|
|
|
38
45
|
def form: () -> Hash[String, untyped]
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
def initialize: (Request request, String | Integer status, String version, headers?) -> void
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
def no_data?: () -> bool
|
|
49
|
+
private
|
|
44
50
|
|
|
45
51
|
def decode:(Transcoder::_Decode transcoder, ?untyped options) -> untyped
|
|
46
52
|
end
|
|
@@ -78,6 +84,8 @@ module HTTPX
|
|
|
78
84
|
|
|
79
85
|
def uri: () -> URI::Generic
|
|
80
86
|
|
|
87
|
+
def peer_address: () -> ipaddr?
|
|
88
|
+
|
|
81
89
|
def close: () -> void
|
|
82
90
|
|
|
83
91
|
private
|
data/sig/timers.rbs
CHANGED
|
@@ -3,30 +3,40 @@ module HTTPX
|
|
|
3
3
|
@intervals: Array[Interval]
|
|
4
4
|
@next_interval_at: Float
|
|
5
5
|
|
|
6
|
-
def after: (Numeric interval_in_secs
|
|
6
|
+
def after: (Numeric interval_in_secs, ^() -> void) -> Interval
|
|
7
|
+
| (Numeric interval_in_secs) { () -> void } -> Interval
|
|
7
8
|
|
|
8
9
|
def wait_interval: () -> Numeric?
|
|
9
10
|
|
|
10
11
|
def fire: (?TimeoutError error) -> void
|
|
11
12
|
|
|
12
|
-
def cancel: () -> void
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
13
|
def initialize: () -> void
|
|
17
14
|
|
|
18
15
|
class Interval
|
|
19
16
|
include Comparable
|
|
20
17
|
|
|
18
|
+
type callback = ^() -> void
|
|
19
|
+
|
|
21
20
|
attr_reader interval: Numeric
|
|
22
21
|
|
|
23
|
-
@callbacks: Array[
|
|
22
|
+
@callbacks: Array[callback]
|
|
23
|
+
@on_empty: callback?
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def on_empty: () { () -> void } -> void
|
|
24
27
|
|
|
25
28
|
def to_f: () -> Float
|
|
26
29
|
|
|
27
|
-
def <<: (
|
|
30
|
+
def <<: (callback) -> void
|
|
31
|
+
|
|
32
|
+
def delete: (callback) -> void
|
|
28
33
|
|
|
29
34
|
def elapse: (Numeric elapsed) -> Numeric
|
|
35
|
+
|
|
36
|
+
def elapsed?: () -> bool
|
|
37
|
+
|
|
38
|
+
def no_callbacks?: () -> bool
|
|
39
|
+
|
|
30
40
|
private
|
|
31
41
|
|
|
32
42
|
def initialize: (Numeric interval) -> void
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: httpx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Cardoso
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: http-2-next
|
|
@@ -131,6 +131,8 @@ extra_rdoc_files:
|
|
|
131
131
|
- doc/release_notes/1_0_0.md
|
|
132
132
|
- doc/release_notes/1_0_1.md
|
|
133
133
|
- doc/release_notes/1_0_2.md
|
|
134
|
+
- doc/release_notes/1_1_0.md
|
|
135
|
+
- doc/release_notes/1_1_1.md
|
|
134
136
|
files:
|
|
135
137
|
- LICENSE.txt
|
|
136
138
|
- README.md
|
|
@@ -233,6 +235,8 @@ files:
|
|
|
233
235
|
- doc/release_notes/1_0_0.md
|
|
234
236
|
- doc/release_notes/1_0_1.md
|
|
235
237
|
- doc/release_notes/1_0_2.md
|
|
238
|
+
- doc/release_notes/1_1_0.md
|
|
239
|
+
- doc/release_notes/1_1_1.md
|
|
236
240
|
- lib/httpx.rb
|
|
237
241
|
- lib/httpx/adapters/datadog.rb
|
|
238
242
|
- lib/httpx/adapters/faraday.rb
|
|
@@ -334,6 +338,7 @@ files:
|
|
|
334
338
|
- lib/httpx/transcoder/multipart/part.rb
|
|
335
339
|
- lib/httpx/transcoder/utils/body_reader.rb
|
|
336
340
|
- lib/httpx/transcoder/utils/deflater.rb
|
|
341
|
+
- lib/httpx/transcoder/utils/inflater.rb
|
|
337
342
|
- lib/httpx/transcoder/xml.rb
|
|
338
343
|
- lib/httpx/utils.rb
|
|
339
344
|
- lib/httpx/version.rb
|
|
@@ -416,6 +421,7 @@ files:
|
|
|
416
421
|
- sig/transcoder/multipart.rbs
|
|
417
422
|
- sig/transcoder/utils/body_reader.rbs
|
|
418
423
|
- sig/transcoder/utils/deflater.rbs
|
|
424
|
+
- sig/transcoder/utils/inflater.rbs
|
|
419
425
|
- sig/transcoder/xml.rbs
|
|
420
426
|
- sig/utils.rbs
|
|
421
427
|
homepage: https://gitlab.com/os85/httpx
|