httpx 0.11.2 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/doc/release_notes/0_11_1.md +5 -1
  4. data/doc/release_notes/0_11_3.md +5 -0
  5. data/doc/release_notes/0_12_0.md +55 -0
  6. data/doc/release_notes/0_13_0.md +58 -0
  7. data/doc/release_notes/0_13_1.md +5 -0
  8. data/doc/release_notes/0_13_2.md +9 -0
  9. data/lib/httpx.rb +2 -1
  10. data/lib/httpx/adapters/faraday.rb +4 -6
  11. data/lib/httpx/altsvc.rb +1 -0
  12. data/lib/httpx/chainable.rb +2 -2
  13. data/lib/httpx/connection.rb +80 -28
  14. data/lib/httpx/connection/http1.rb +19 -6
  15. data/lib/httpx/connection/http2.rb +32 -25
  16. data/lib/httpx/io.rb +16 -3
  17. data/lib/httpx/io/ssl.rb +35 -24
  18. data/lib/httpx/io/tcp.rb +50 -28
  19. data/lib/httpx/io/tls.rb +218 -0
  20. data/lib/httpx/io/tls/box.rb +365 -0
  21. data/lib/httpx/io/tls/context.rb +199 -0
  22. data/lib/httpx/io/tls/ffi.rb +390 -0
  23. data/lib/httpx/io/udp.rb +31 -7
  24. data/lib/httpx/io/unix.rb +27 -12
  25. data/lib/httpx/options.rb +11 -23
  26. data/lib/httpx/parser/http1.rb +4 -4
  27. data/lib/httpx/plugins/aws_sdk_authentication.rb +81 -0
  28. data/lib/httpx/plugins/aws_sigv4.rb +219 -0
  29. data/lib/httpx/plugins/compression.rb +20 -8
  30. data/lib/httpx/plugins/compression/brotli.rb +8 -6
  31. data/lib/httpx/plugins/compression/deflate.rb +4 -7
  32. data/lib/httpx/plugins/compression/gzip.rb +2 -2
  33. data/lib/httpx/plugins/digest_authentication.rb +1 -1
  34. data/lib/httpx/plugins/follow_redirects.rb +1 -1
  35. data/lib/httpx/plugins/h2c.rb +43 -58
  36. data/lib/httpx/plugins/internal_telemetry.rb +93 -0
  37. data/lib/httpx/plugins/multipart.rb +2 -0
  38. data/lib/httpx/plugins/multipart/encoder.rb +4 -9
  39. data/lib/httpx/plugins/proxy.rb +1 -1
  40. data/lib/httpx/plugins/proxy/http.rb +1 -1
  41. data/lib/httpx/plugins/proxy/socks4.rb +8 -0
  42. data/lib/httpx/plugins/proxy/socks5.rb +8 -0
  43. data/lib/httpx/plugins/push_promise.rb +3 -2
  44. data/lib/httpx/plugins/retries.rb +2 -2
  45. data/lib/httpx/plugins/stream.rb +6 -6
  46. data/lib/httpx/plugins/upgrade.rb +84 -0
  47. data/lib/httpx/plugins/upgrade/h2.rb +54 -0
  48. data/lib/httpx/pool.rb +14 -6
  49. data/lib/httpx/registry.rb +1 -7
  50. data/lib/httpx/request.rb +11 -1
  51. data/lib/httpx/resolver/https.rb +3 -11
  52. data/lib/httpx/resolver/native.rb +7 -3
  53. data/lib/httpx/response.rb +14 -7
  54. data/lib/httpx/selector.rb +5 -0
  55. data/lib/httpx/session.rb +25 -2
  56. data/lib/httpx/transcoder/body.rb +3 -5
  57. data/lib/httpx/version.rb +1 -1
  58. data/sig/chainable.rbs +2 -1
  59. data/sig/connection/http1.rbs +3 -2
  60. data/sig/connection/http2.rbs +5 -3
  61. data/sig/options.rbs +7 -20
  62. data/sig/plugins/aws_sdk_authentication.rbs +17 -0
  63. data/sig/plugins/aws_sigv4.rbs +64 -0
  64. data/sig/plugins/compression.rbs +5 -3
  65. data/sig/plugins/compression/brotli.rbs +1 -1
  66. data/sig/plugins/compression/deflate.rbs +1 -1
  67. data/sig/plugins/compression/gzip.rbs +1 -1
  68. data/sig/plugins/cookies.rbs +0 -1
  69. data/sig/plugins/digest_authentication.rbs +0 -1
  70. data/sig/plugins/expect.rbs +0 -2
  71. data/sig/plugins/follow_redirects.rbs +0 -2
  72. data/sig/plugins/h2c.rbs +5 -10
  73. data/sig/plugins/persistent.rbs +0 -1
  74. data/sig/plugins/proxy.rbs +0 -1
  75. data/sig/plugins/push_promise.rbs +1 -1
  76. data/sig/plugins/retries.rbs +0 -4
  77. data/sig/plugins/upgrade.rbs +23 -0
  78. data/sig/response.rbs +3 -1
  79. metadata +24 -2
@@ -0,0 +1,23 @@
1
+ module HTTPX
2
+ module Plugins
3
+ module Upgrade
4
+ type handlers_registry = Registry[Symbol, Class]
5
+
6
+ def self.configure: (singleton(Session)) -> void
7
+
8
+ interface _UpgradeOptions
9
+ def upgrade_handlers: () -> handlers_registry?
10
+ def upgrade_handlers=: (handlers_registry) -> handlers_registry
11
+ end
12
+
13
+ def self.extra_options: (Options) -> (Options & _UpgradeOptions)
14
+
15
+ module ConnectionMethods
16
+ attr_reader upgrade_protocol: Symbol?
17
+ attr_reader hijacked: boolish
18
+
19
+ def hijack_io: () -> void
20
+ end
21
+ end
22
+ end
23
+ end
data/sig/response.rbs CHANGED
@@ -37,6 +37,8 @@ module HTTPX
37
37
  include _ToStr
38
38
 
39
39
  @state: :idle | :memory | :buffer
40
+ @threshold_size: Integer
41
+ @window_size: Integer
40
42
 
41
43
  def each: () { (String) -> void } -> void
42
44
  | () -> Enumerable[String]
@@ -48,7 +50,7 @@ module HTTPX
48
50
 
49
51
  private
50
52
 
51
- def initialize: (Response, ?threshold_size: Integer, ?window_size: Integer) -> untyped
53
+ def initialize: (Response, options) -> untyped
52
54
  def rewind: () -> void
53
55
  def transition: () -> void
54
56
  end
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: 0.11.2
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-12 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -57,6 +57,11 @@ extra_rdoc_files:
57
57
  - doc/release_notes/0_11_0.md
58
58
  - doc/release_notes/0_11_1.md
59
59
  - doc/release_notes/0_11_2.md
60
+ - doc/release_notes/0_11_3.md
61
+ - doc/release_notes/0_12_0.md
62
+ - doc/release_notes/0_13_0.md
63
+ - doc/release_notes/0_13_1.md
64
+ - doc/release_notes/0_13_2.md
60
65
  - doc/release_notes/0_1_0.md
61
66
  - doc/release_notes/0_2_0.md
62
67
  - doc/release_notes/0_2_1.md
@@ -93,6 +98,11 @@ files:
93
98
  - doc/release_notes/0_11_0.md
94
99
  - doc/release_notes/0_11_1.md
95
100
  - doc/release_notes/0_11_2.md
101
+ - doc/release_notes/0_11_3.md
102
+ - doc/release_notes/0_12_0.md
103
+ - doc/release_notes/0_13_0.md
104
+ - doc/release_notes/0_13_1.md
105
+ - doc/release_notes/0_13_2.md
96
106
  - doc/release_notes/0_1_0.md
97
107
  - doc/release_notes/0_2_0.md
98
108
  - doc/release_notes/0_2_1.md
@@ -133,12 +143,18 @@ files:
133
143
  - lib/httpx/io.rb
134
144
  - lib/httpx/io/ssl.rb
135
145
  - lib/httpx/io/tcp.rb
146
+ - lib/httpx/io/tls.rb
147
+ - lib/httpx/io/tls/box.rb
148
+ - lib/httpx/io/tls/context.rb
149
+ - lib/httpx/io/tls/ffi.rb
136
150
  - lib/httpx/io/udp.rb
137
151
  - lib/httpx/io/unix.rb
138
152
  - lib/httpx/loggable.rb
139
153
  - lib/httpx/options.rb
140
154
  - lib/httpx/parser/http1.rb
141
155
  - lib/httpx/plugins/authentication.rb
156
+ - lib/httpx/plugins/aws_sdk_authentication.rb
157
+ - lib/httpx/plugins/aws_sigv4.rb
142
158
  - lib/httpx/plugins/basic_authentication.rb
143
159
  - lib/httpx/plugins/compression.rb
144
160
  - lib/httpx/plugins/compression/brotli.rb
@@ -152,6 +168,7 @@ files:
152
168
  - lib/httpx/plugins/expect.rb
153
169
  - lib/httpx/plugins/follow_redirects.rb
154
170
  - lib/httpx/plugins/h2c.rb
171
+ - lib/httpx/plugins/internal_telemetry.rb
155
172
  - lib/httpx/plugins/multipart.rb
156
173
  - lib/httpx/plugins/multipart/encoder.rb
157
174
  - lib/httpx/plugins/multipart/mime_type_detector.rb
@@ -166,6 +183,8 @@ files:
166
183
  - lib/httpx/plugins/rate_limiter.rb
167
184
  - lib/httpx/plugins/retries.rb
168
185
  - lib/httpx/plugins/stream.rb
186
+ - lib/httpx/plugins/upgrade.rb
187
+ - lib/httpx/plugins/upgrade/h2.rb
169
188
  - lib/httpx/pool.rb
170
189
  - lib/httpx/registry.rb
171
190
  - lib/httpx/request.rb
@@ -199,6 +218,8 @@ files:
199
218
  - sig/options.rbs
200
219
  - sig/parser/http1.rbs
201
220
  - sig/plugins/authentication.rbs
221
+ - sig/plugins/aws_sdk_authentication.rbs
222
+ - sig/plugins/aws_sigv4.rbs
202
223
  - sig/plugins/basic_authentication.rbs
203
224
  - sig/plugins/compression.rbs
204
225
  - sig/plugins/compression/brotli.rbs
@@ -222,6 +243,7 @@ files:
222
243
  - sig/plugins/rate_limiter.rbs
223
244
  - sig/plugins/retries.rbs
224
245
  - sig/plugins/stream.rbs
246
+ - sig/plugins/upgrade.rbs
225
247
  - sig/pool.rbs
226
248
  - sig/registry.rbs
227
249
  - sig/request.rbs