httpx 0.20.0 → 1.3.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.
Files changed (250) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +0 -48
  3. data/README.md +54 -45
  4. data/doc/release_notes/0_10_0.md +2 -2
  5. data/doc/release_notes/0_11_0.md +3 -5
  6. data/doc/release_notes/0_12_0.md +5 -5
  7. data/doc/release_notes/0_13_0.md +5 -5
  8. data/doc/release_notes/0_14_0.md +2 -2
  9. data/doc/release_notes/0_16_0.md +3 -3
  10. data/doc/release_notes/0_17_0.md +1 -1
  11. data/doc/release_notes/0_18_0.md +4 -4
  12. data/doc/release_notes/0_18_2.md +1 -1
  13. data/doc/release_notes/0_19_0.md +1 -1
  14. data/doc/release_notes/0_19_8.md +1 -1
  15. data/doc/release_notes/0_20_0.md +2 -2
  16. data/doc/release_notes/0_20_1.md +5 -0
  17. data/doc/release_notes/0_20_2.md +7 -0
  18. data/doc/release_notes/0_20_3.md +6 -0
  19. data/doc/release_notes/0_20_4.md +17 -0
  20. data/doc/release_notes/0_20_5.md +3 -0
  21. data/doc/release_notes/0_21_0.md +96 -0
  22. data/doc/release_notes/0_21_1.md +12 -0
  23. data/doc/release_notes/0_22_0.md +13 -0
  24. data/doc/release_notes/0_22_1.md +11 -0
  25. data/doc/release_notes/0_22_2.md +5 -0
  26. data/doc/release_notes/0_22_3.md +55 -0
  27. data/doc/release_notes/0_22_4.md +6 -0
  28. data/doc/release_notes/0_22_5.md +6 -0
  29. data/doc/release_notes/0_23_0.md +42 -0
  30. data/doc/release_notes/0_23_1.md +5 -0
  31. data/doc/release_notes/0_23_2.md +5 -0
  32. data/doc/release_notes/0_23_3.md +6 -0
  33. data/doc/release_notes/0_23_4.md +5 -0
  34. data/doc/release_notes/0_24_0.md +48 -0
  35. data/doc/release_notes/0_24_1.md +12 -0
  36. data/doc/release_notes/0_24_2.md +12 -0
  37. data/doc/release_notes/0_24_3.md +12 -0
  38. data/doc/release_notes/0_24_4.md +18 -0
  39. data/doc/release_notes/0_24_5.md +6 -0
  40. data/doc/release_notes/0_24_6.md +5 -0
  41. data/doc/release_notes/0_24_7.md +10 -0
  42. data/doc/release_notes/1_0_0.md +60 -0
  43. data/doc/release_notes/1_0_1.md +5 -0
  44. data/doc/release_notes/1_0_2.md +7 -0
  45. data/doc/release_notes/1_1_0.md +32 -0
  46. data/doc/release_notes/1_1_1.md +17 -0
  47. data/doc/release_notes/1_1_2.md +12 -0
  48. data/doc/release_notes/1_1_3.md +18 -0
  49. data/doc/release_notes/1_1_4.md +6 -0
  50. data/doc/release_notes/1_1_5.md +12 -0
  51. data/doc/release_notes/1_2_0.md +49 -0
  52. data/doc/release_notes/1_2_1.md +6 -0
  53. data/doc/release_notes/1_2_2.md +10 -0
  54. data/doc/release_notes/1_2_3.md +16 -0
  55. data/doc/release_notes/1_2_4.md +8 -0
  56. data/doc/release_notes/1_2_5.md +7 -0
  57. data/doc/release_notes/1_2_6.md +13 -0
  58. data/doc/release_notes/1_3_0.md +18 -0
  59. data/doc/release_notes/1_3_1.md +17 -0
  60. data/lib/httpx/adapters/datadog.rb +215 -122
  61. data/lib/httpx/adapters/faraday.rb +145 -107
  62. data/lib/httpx/adapters/sentry.rb +26 -7
  63. data/lib/httpx/adapters/webmock.rb +34 -18
  64. data/lib/httpx/altsvc.rb +63 -26
  65. data/lib/httpx/base64.rb +27 -0
  66. data/lib/httpx/buffer.rb +12 -0
  67. data/lib/httpx/callbacks.rb +5 -3
  68. data/lib/httpx/chainable.rb +54 -39
  69. data/lib/httpx/connection/http1.rb +75 -44
  70. data/lib/httpx/connection/http2.rb +31 -38
  71. data/lib/httpx/connection.rb +287 -117
  72. data/lib/httpx/domain_name.rb +10 -13
  73. data/lib/httpx/errors.rb +52 -2
  74. data/lib/httpx/extensions.rb +24 -131
  75. data/lib/httpx/io/ssl.rb +83 -77
  76. data/lib/httpx/io/tcp.rb +48 -71
  77. data/lib/httpx/io/udp.rb +18 -52
  78. data/lib/httpx/io/unix.rb +10 -15
  79. data/lib/httpx/io.rb +3 -9
  80. data/lib/httpx/loggable.rb +4 -19
  81. data/lib/httpx/options.rb +176 -118
  82. data/lib/httpx/parser/http1.rb +4 -0
  83. data/lib/httpx/plugins/{authentication → auth}/basic.rb +1 -5
  84. data/lib/httpx/plugins/{authentication → auth}/digest.rb +14 -14
  85. data/lib/httpx/plugins/{authentication → auth}/ntlm.rb +1 -3
  86. data/lib/httpx/plugins/{authentication → auth}/socks5.rb +0 -2
  87. data/lib/httpx/plugins/auth.rb +25 -0
  88. data/lib/httpx/plugins/aws_sdk_authentication.rb +4 -3
  89. data/lib/httpx/plugins/aws_sigv4.rb +12 -9
  90. data/lib/httpx/plugins/basic_auth.rb +29 -0
  91. data/lib/httpx/plugins/brotli.rb +50 -0
  92. data/lib/httpx/plugins/callbacks.rb +91 -0
  93. data/lib/httpx/plugins/circuit_breaker/circuit.rb +100 -0
  94. data/lib/httpx/plugins/circuit_breaker/circuit_store.rb +53 -0
  95. data/lib/httpx/plugins/circuit_breaker.rb +148 -0
  96. data/lib/httpx/plugins/cookies/set_cookie_parser.rb +0 -2
  97. data/lib/httpx/plugins/cookies.rb +30 -17
  98. data/lib/httpx/plugins/{digest_authentication.rb → digest_auth.rb} +14 -12
  99. data/lib/httpx/plugins/expect.rb +21 -14
  100. data/lib/httpx/plugins/follow_redirects.rb +140 -41
  101. data/lib/httpx/plugins/grpc/call.rb +2 -3
  102. data/lib/httpx/plugins/grpc/grpc_encoding.rb +88 -0
  103. data/lib/httpx/plugins/grpc/message.rb +7 -37
  104. data/lib/httpx/plugins/grpc.rb +36 -29
  105. data/lib/httpx/plugins/h2c.rb +26 -19
  106. data/lib/httpx/plugins/internal_telemetry.rb +16 -0
  107. data/lib/httpx/plugins/{ntlm_authentication.rb → ntlm_auth.rb} +7 -5
  108. data/lib/httpx/plugins/oauth.rb +175 -0
  109. data/lib/httpx/plugins/persistent.rb +1 -1
  110. data/lib/httpx/plugins/proxy/http.rb +23 -13
  111. data/lib/httpx/plugins/proxy/socks4.rb +9 -7
  112. data/lib/httpx/plugins/proxy/socks5.rb +11 -9
  113. data/lib/httpx/plugins/proxy.rb +80 -61
  114. data/lib/httpx/plugins/push_promise.rb +1 -1
  115. data/lib/httpx/plugins/rate_limiter.rb +5 -1
  116. data/lib/httpx/plugins/response_cache/file_store.rb +40 -0
  117. data/lib/httpx/plugins/response_cache/store.rb +62 -25
  118. data/lib/httpx/plugins/response_cache.rb +105 -12
  119. data/lib/httpx/plugins/retries.rb +87 -17
  120. data/lib/httpx/plugins/ssrf_filter.rb +145 -0
  121. data/lib/httpx/plugins/stream.rb +27 -23
  122. data/lib/httpx/plugins/upgrade/h2.rb +4 -4
  123. data/lib/httpx/plugins/upgrade.rb +8 -10
  124. data/lib/httpx/plugins/webdav.rb +80 -0
  125. data/lib/httpx/pool/synch_pool.rb +93 -0
  126. data/lib/httpx/pool.rb +102 -27
  127. data/lib/httpx/punycode.rb +9 -291
  128. data/lib/httpx/request/body.rb +154 -0
  129. data/lib/httpx/request.rb +130 -146
  130. data/lib/httpx/resolver/https.rb +62 -27
  131. data/lib/httpx/resolver/multi.rb +9 -13
  132. data/lib/httpx/resolver/native.rb +192 -76
  133. data/lib/httpx/resolver/resolver.rb +34 -9
  134. data/lib/httpx/resolver/system.rb +16 -11
  135. data/lib/httpx/resolver.rb +38 -16
  136. data/lib/httpx/response/body.rb +242 -0
  137. data/lib/httpx/response/buffer.rb +96 -0
  138. data/lib/httpx/response.rb +159 -217
  139. data/lib/httpx/selector.rb +9 -4
  140. data/lib/httpx/session.rb +137 -89
  141. data/lib/httpx/session_extensions.rb +4 -1
  142. data/lib/httpx/timers.rb +34 -8
  143. data/lib/httpx/transcoder/body.rb +0 -2
  144. data/lib/httpx/transcoder/chunker.rb +0 -1
  145. data/lib/httpx/transcoder/deflate.rb +37 -0
  146. data/lib/httpx/transcoder/form.rb +52 -33
  147. data/lib/httpx/transcoder/gzip.rb +74 -0
  148. data/lib/httpx/transcoder/json.rb +21 -8
  149. data/lib/httpx/transcoder/multipart/decoder.rb +139 -0
  150. data/lib/httpx/{plugins → transcoder}/multipart/encoder.rb +4 -4
  151. data/lib/httpx/{plugins → transcoder}/multipart/mime_type_detector.rb +1 -1
  152. data/lib/httpx/{plugins → transcoder}/multipart/part.rb +3 -2
  153. data/lib/httpx/transcoder/multipart.rb +17 -0
  154. data/lib/httpx/transcoder/utils/body_reader.rb +46 -0
  155. data/lib/httpx/transcoder/utils/deflater.rb +72 -0
  156. data/lib/httpx/transcoder/utils/inflater.rb +19 -0
  157. data/lib/httpx/transcoder/xml.rb +52 -0
  158. data/lib/httpx/transcoder.rb +5 -6
  159. data/lib/httpx/utils.rb +36 -16
  160. data/lib/httpx/version.rb +1 -1
  161. data/lib/httpx.rb +12 -14
  162. data/sig/altsvc.rbs +33 -0
  163. data/sig/buffer.rbs +2 -1
  164. data/sig/callbacks.rbs +3 -3
  165. data/sig/chainable.rbs +11 -9
  166. data/sig/connection/http1.rbs +8 -7
  167. data/sig/connection/http2.rbs +19 -19
  168. data/sig/connection.rbs +64 -24
  169. data/sig/errors.rbs +22 -3
  170. data/sig/httpx.rbs +5 -4
  171. data/sig/io/ssl.rbs +27 -0
  172. data/sig/io/tcp.rbs +60 -0
  173. data/sig/io/udp.rbs +20 -0
  174. data/sig/io/unix.rbs +27 -0
  175. data/sig/io.rbs +6 -0
  176. data/sig/options.rbs +32 -22
  177. data/sig/parser/http1.rbs +1 -1
  178. data/sig/plugins/{authentication → auth}/basic.rbs +0 -2
  179. data/sig/plugins/{authentication → auth}/digest.rbs +2 -1
  180. data/sig/plugins/auth.rbs +13 -0
  181. data/sig/plugins/{basic_authentication.rbs → basic_auth.rbs} +2 -2
  182. data/sig/plugins/brotli.rbs +22 -0
  183. data/sig/plugins/callbacks.rbs +38 -0
  184. data/sig/plugins/circuit_breaker.rbs +71 -0
  185. data/sig/plugins/compression.rbs +7 -5
  186. data/sig/plugins/cookies/jar.rbs +2 -2
  187. data/sig/plugins/cookies.rbs +2 -0
  188. data/sig/plugins/{digest_authentication.rbs → digest_auth.rbs} +2 -2
  189. data/sig/plugins/follow_redirects.rbs +18 -4
  190. data/sig/plugins/grpc/call.rbs +19 -0
  191. data/sig/plugins/grpc/grpc_encoding.rbs +37 -0
  192. data/sig/plugins/grpc/message.rbs +17 -0
  193. data/sig/plugins/grpc.rbs +7 -32
  194. data/sig/plugins/h2c.rbs +1 -1
  195. data/sig/plugins/{ntlm_authentication.rbs → ntlm_auth.rbs} +2 -2
  196. data/sig/plugins/oauth.rbs +54 -0
  197. data/sig/plugins/proxy/http.rbs +3 -0
  198. data/sig/plugins/proxy/socks4.rbs +9 -6
  199. data/sig/plugins/proxy/socks5.rbs +10 -6
  200. data/sig/plugins/proxy/ssh.rbs +1 -1
  201. data/sig/plugins/proxy.rbs +13 -5
  202. data/sig/plugins/push_promise.rbs +3 -3
  203. data/sig/plugins/rate_limiter.rbs +1 -1
  204. data/sig/plugins/response_cache.rbs +36 -7
  205. data/sig/plugins/retries.rbs +30 -8
  206. data/sig/plugins/stream.rbs +24 -17
  207. data/sig/plugins/upgrade.rbs +5 -3
  208. data/sig/pool.rbs +10 -7
  209. data/sig/request/body.rbs +38 -0
  210. data/sig/request.rbs +15 -24
  211. data/sig/resolver/https.rbs +8 -3
  212. data/sig/resolver/native.rbs +17 -4
  213. data/sig/resolver/resolver.rbs +8 -6
  214. data/sig/resolver/system.rbs +2 -0
  215. data/sig/resolver.rbs +9 -5
  216. data/sig/response/body.rbs +53 -0
  217. data/sig/response/buffer.rbs +24 -0
  218. data/sig/response.rbs +24 -39
  219. data/sig/selector.rbs +1 -1
  220. data/sig/session.rbs +29 -18
  221. data/sig/timers.rbs +18 -8
  222. data/sig/transcoder/body.rbs +4 -3
  223. data/sig/transcoder/deflate.rbs +11 -0
  224. data/sig/transcoder/form.rbs +5 -3
  225. data/sig/transcoder/gzip.rbs +24 -0
  226. data/sig/transcoder/json.rbs +8 -3
  227. data/sig/{plugins → transcoder}/multipart.rbs +15 -19
  228. data/sig/transcoder/utils/body_reader.rbs +15 -0
  229. data/sig/transcoder/utils/deflater.rbs +29 -0
  230. data/sig/transcoder/utils/inflater.rbs +12 -0
  231. data/sig/transcoder/xml.rbs +22 -0
  232. data/sig/transcoder.rbs +24 -9
  233. data/sig/utils.rbs +8 -2
  234. metadata +163 -41
  235. data/lib/httpx/plugins/authentication.rb +0 -20
  236. data/lib/httpx/plugins/basic_authentication.rb +0 -30
  237. data/lib/httpx/plugins/compression/brotli.rb +0 -54
  238. data/lib/httpx/plugins/compression/deflate.rb +0 -49
  239. data/lib/httpx/plugins/compression/gzip.rb +0 -88
  240. data/lib/httpx/plugins/compression.rb +0 -164
  241. data/lib/httpx/plugins/multipart/decoder.rb +0 -187
  242. data/lib/httpx/plugins/multipart.rb +0 -84
  243. data/lib/httpx/registry.rb +0 -85
  244. data/sig/plugins/authentication.rbs +0 -11
  245. data/sig/plugins/compression/brotli.rbs +0 -21
  246. data/sig/plugins/compression/deflate.rbs +0 -17
  247. data/sig/plugins/compression/gzip.rbs +0 -29
  248. data/sig/registry.rbs +0 -12
  249. /data/sig/plugins/{authentication → auth}/ntlm.rbs +0 -0
  250. /data/sig/plugins/{authentication → auth}/socks5.rbs +0 -0
data/sig/transcoder.rbs CHANGED
@@ -1,14 +1,9 @@
1
1
  module HTTPX
2
- type bodyIO = _Reader | _Each[[String, untyped]] | _ToS
2
+ type bodyIO = _Reader | _Each[String] | _ToS
3
3
 
4
- type body_encoder = Transcoder::_Encoder | _Each[String]
4
+ type body_encoder = (Transcoder::_Encoder & _ToS) | (Transcoder::_Encoder & _Reader) | (Transcoder::_Encoder & _Each[String])
5
5
 
6
6
  module Transcoder
7
- def self?.registry: (String tag) -> _Encode
8
- | () -> Hash[String, _Encode]
9
-
10
- def self?.register: (String tag, _Encode handler) -> void
11
-
12
7
  def self?.normalize_keys: [U] (_ToS key, _ToAry[untyped] | _ToHash[_ToS, untyped] | untyped value, ?(^(untyped value) -> bool | nil) cond) { (String, ?untyped) -> U } -> U
13
8
 
14
9
  def self?.normalize_query: (Hash[String, untyped] params, String name, String v, Integer depth) -> void
@@ -17,12 +12,32 @@ module HTTPX
17
12
  def encode: (untyped payload) -> body_encoder
18
13
  end
19
14
 
15
+ interface _Decode
16
+ def decode: (HTTPX::Response response) -> _Decoder
17
+ end
18
+
20
19
  interface _Encoder
21
- def bytesize: () -> Numeric
20
+ def bytesize: () -> (Integer | Float)
21
+
22
+ def content_type: () -> String
22
23
  end
23
24
 
24
25
  interface _Decoder
25
- def call: (Response response, untyped options) -> untyped
26
+ def call: (Response response, *untyped) -> untyped
27
+ end
28
+
29
+ interface _Inflater
30
+ def initialize: (Integer | Float bytesize) -> void
31
+
32
+ def call: (String chunk) -> String
33
+ end
34
+
35
+ interface _Deflater
36
+ def initialize: (Response body) -> void
37
+
38
+ def deflate: () -> void
39
+
40
+ def call: (StringIO | File buffer, ?chunk_size: Integer) ?{ (String chunk) -> void } -> void
26
41
  end
27
42
  end
28
43
  end
data/sig/utils.rbs CHANGED
@@ -1,13 +1,19 @@
1
1
  module HTTPX
2
2
  module Utils
3
+ TOKEN: Regexp
4
+ VALUE: Regexp
5
+ FILENAME_REGEX: Regexp
6
+ FILENAME_EXTENSION_REGEX: Regexp
3
7
  URIParser: URI::RFC2396_Parser
4
8
 
5
9
  def self?.parse_retry_after: (String) -> Numeric
6
10
 
7
- def self?.now: () -> Numeric
11
+ def self?.now: () -> Float
8
12
 
9
- def self?.elapsed_time: (Numeric monotonic_time) -> Numeric
13
+ def self?.elapsed_time: (Integer | Float monotonic_time) -> Float
10
14
 
11
15
  def self?.to_uri: (generic_uri uri) -> URI::Generic
16
+
17
+ def self?.get_filename: (String header) -> String?
12
18
  end
13
19
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 1.3.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: 2022-05-31 00:00:00.000000000 Z
11
+ date: 2024-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: http-2-next
14
+ name: http-2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.1
19
+ version: 1.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.1
26
+ version: 1.0.0
27
27
  description: A client library for making HTTP requests from Ruby.
28
28
  email:
29
29
  - cardoso_tiago@hotmail.com
@@ -81,6 +81,32 @@ extra_rdoc_files:
81
81
  - doc/release_notes/0_19_8.md
82
82
  - doc/release_notes/0_1_0.md
83
83
  - doc/release_notes/0_20_0.md
84
+ - doc/release_notes/0_20_1.md
85
+ - doc/release_notes/0_20_2.md
86
+ - doc/release_notes/0_20_3.md
87
+ - doc/release_notes/0_20_4.md
88
+ - doc/release_notes/0_20_5.md
89
+ - doc/release_notes/0_21_0.md
90
+ - doc/release_notes/0_21_1.md
91
+ - doc/release_notes/0_22_0.md
92
+ - doc/release_notes/0_22_1.md
93
+ - doc/release_notes/0_22_2.md
94
+ - doc/release_notes/0_22_3.md
95
+ - doc/release_notes/0_22_4.md
96
+ - doc/release_notes/0_22_5.md
97
+ - doc/release_notes/0_23_0.md
98
+ - doc/release_notes/0_23_1.md
99
+ - doc/release_notes/0_23_2.md
100
+ - doc/release_notes/0_23_3.md
101
+ - doc/release_notes/0_23_4.md
102
+ - doc/release_notes/0_24_0.md
103
+ - doc/release_notes/0_24_1.md
104
+ - doc/release_notes/0_24_2.md
105
+ - doc/release_notes/0_24_3.md
106
+ - doc/release_notes/0_24_4.md
107
+ - doc/release_notes/0_24_5.md
108
+ - doc/release_notes/0_24_6.md
109
+ - doc/release_notes/0_24_7.md
84
110
  - doc/release_notes/0_2_0.md
85
111
  - doc/release_notes/0_2_1.md
86
112
  - doc/release_notes/0_3_0.md
@@ -102,6 +128,24 @@ extra_rdoc_files:
102
128
  - doc/release_notes/0_8_1.md
103
129
  - doc/release_notes/0_8_2.md
104
130
  - doc/release_notes/0_9_0.md
131
+ - doc/release_notes/1_0_0.md
132
+ - doc/release_notes/1_0_1.md
133
+ - doc/release_notes/1_0_2.md
134
+ - doc/release_notes/1_1_0.md
135
+ - doc/release_notes/1_1_1.md
136
+ - doc/release_notes/1_1_2.md
137
+ - doc/release_notes/1_1_3.md
138
+ - doc/release_notes/1_1_4.md
139
+ - doc/release_notes/1_1_5.md
140
+ - doc/release_notes/1_2_0.md
141
+ - doc/release_notes/1_2_1.md
142
+ - doc/release_notes/1_2_2.md
143
+ - doc/release_notes/1_2_3.md
144
+ - doc/release_notes/1_2_4.md
145
+ - doc/release_notes/1_2_5.md
146
+ - doc/release_notes/1_2_6.md
147
+ - doc/release_notes/1_3_0.md
148
+ - doc/release_notes/1_3_1.md
105
149
  files:
106
150
  - LICENSE.txt
107
151
  - README.md
@@ -154,6 +198,32 @@ files:
154
198
  - doc/release_notes/0_19_8.md
155
199
  - doc/release_notes/0_1_0.md
156
200
  - doc/release_notes/0_20_0.md
201
+ - doc/release_notes/0_20_1.md
202
+ - doc/release_notes/0_20_2.md
203
+ - doc/release_notes/0_20_3.md
204
+ - doc/release_notes/0_20_4.md
205
+ - doc/release_notes/0_20_5.md
206
+ - doc/release_notes/0_21_0.md
207
+ - doc/release_notes/0_21_1.md
208
+ - doc/release_notes/0_22_0.md
209
+ - doc/release_notes/0_22_1.md
210
+ - doc/release_notes/0_22_2.md
211
+ - doc/release_notes/0_22_3.md
212
+ - doc/release_notes/0_22_4.md
213
+ - doc/release_notes/0_22_5.md
214
+ - doc/release_notes/0_23_0.md
215
+ - doc/release_notes/0_23_1.md
216
+ - doc/release_notes/0_23_2.md
217
+ - doc/release_notes/0_23_3.md
218
+ - doc/release_notes/0_23_4.md
219
+ - doc/release_notes/0_24_0.md
220
+ - doc/release_notes/0_24_1.md
221
+ - doc/release_notes/0_24_2.md
222
+ - doc/release_notes/0_24_3.md
223
+ - doc/release_notes/0_24_4.md
224
+ - doc/release_notes/0_24_5.md
225
+ - doc/release_notes/0_24_6.md
226
+ - doc/release_notes/0_24_7.md
157
227
  - doc/release_notes/0_2_0.md
158
228
  - doc/release_notes/0_2_1.md
159
229
  - doc/release_notes/0_3_0.md
@@ -175,12 +245,31 @@ files:
175
245
  - doc/release_notes/0_8_1.md
176
246
  - doc/release_notes/0_8_2.md
177
247
  - doc/release_notes/0_9_0.md
248
+ - doc/release_notes/1_0_0.md
249
+ - doc/release_notes/1_0_1.md
250
+ - doc/release_notes/1_0_2.md
251
+ - doc/release_notes/1_1_0.md
252
+ - doc/release_notes/1_1_1.md
253
+ - doc/release_notes/1_1_2.md
254
+ - doc/release_notes/1_1_3.md
255
+ - doc/release_notes/1_1_4.md
256
+ - doc/release_notes/1_1_5.md
257
+ - doc/release_notes/1_2_0.md
258
+ - doc/release_notes/1_2_1.md
259
+ - doc/release_notes/1_2_2.md
260
+ - doc/release_notes/1_2_3.md
261
+ - doc/release_notes/1_2_4.md
262
+ - doc/release_notes/1_2_5.md
263
+ - doc/release_notes/1_2_6.md
264
+ - doc/release_notes/1_3_0.md
265
+ - doc/release_notes/1_3_1.md
178
266
  - lib/httpx.rb
179
267
  - lib/httpx/adapters/datadog.rb
180
268
  - lib/httpx/adapters/faraday.rb
181
269
  - lib/httpx/adapters/sentry.rb
182
270
  - lib/httpx/adapters/webmock.rb
183
271
  - lib/httpx/altsvc.rb
272
+ - lib/httpx/base64.rb
184
273
  - lib/httpx/buffer.rb
185
274
  - lib/httpx/callbacks.rb
186
275
  - lib/httpx/chainable.rb
@@ -199,36 +288,34 @@ files:
199
288
  - lib/httpx/loggable.rb
200
289
  - lib/httpx/options.rb
201
290
  - lib/httpx/parser/http1.rb
202
- - lib/httpx/plugins/authentication.rb
203
- - lib/httpx/plugins/authentication/basic.rb
204
- - lib/httpx/plugins/authentication/digest.rb
205
- - lib/httpx/plugins/authentication/ntlm.rb
206
- - lib/httpx/plugins/authentication/socks5.rb
291
+ - lib/httpx/plugins/auth.rb
292
+ - lib/httpx/plugins/auth/basic.rb
293
+ - lib/httpx/plugins/auth/digest.rb
294
+ - lib/httpx/plugins/auth/ntlm.rb
295
+ - lib/httpx/plugins/auth/socks5.rb
207
296
  - lib/httpx/plugins/aws_sdk_authentication.rb
208
297
  - lib/httpx/plugins/aws_sigv4.rb
209
- - lib/httpx/plugins/basic_authentication.rb
210
- - lib/httpx/plugins/compression.rb
211
- - lib/httpx/plugins/compression/brotli.rb
212
- - lib/httpx/plugins/compression/deflate.rb
213
- - lib/httpx/plugins/compression/gzip.rb
298
+ - lib/httpx/plugins/basic_auth.rb
299
+ - lib/httpx/plugins/brotli.rb
300
+ - lib/httpx/plugins/callbacks.rb
301
+ - lib/httpx/plugins/circuit_breaker.rb
302
+ - lib/httpx/plugins/circuit_breaker/circuit.rb
303
+ - lib/httpx/plugins/circuit_breaker/circuit_store.rb
214
304
  - lib/httpx/plugins/cookies.rb
215
305
  - lib/httpx/plugins/cookies/cookie.rb
216
306
  - lib/httpx/plugins/cookies/jar.rb
217
307
  - lib/httpx/plugins/cookies/set_cookie_parser.rb
218
- - lib/httpx/plugins/digest_authentication.rb
308
+ - lib/httpx/plugins/digest_auth.rb
219
309
  - lib/httpx/plugins/expect.rb
220
310
  - lib/httpx/plugins/follow_redirects.rb
221
311
  - lib/httpx/plugins/grpc.rb
222
312
  - lib/httpx/plugins/grpc/call.rb
313
+ - lib/httpx/plugins/grpc/grpc_encoding.rb
223
314
  - lib/httpx/plugins/grpc/message.rb
224
315
  - lib/httpx/plugins/h2c.rb
225
316
  - lib/httpx/plugins/internal_telemetry.rb
226
- - lib/httpx/plugins/multipart.rb
227
- - lib/httpx/plugins/multipart/decoder.rb
228
- - lib/httpx/plugins/multipart/encoder.rb
229
- - lib/httpx/plugins/multipart/mime_type_detector.rb
230
- - lib/httpx/plugins/multipart/part.rb
231
- - lib/httpx/plugins/ntlm_authentication.rb
317
+ - lib/httpx/plugins/ntlm_auth.rb
318
+ - lib/httpx/plugins/oauth.rb
232
319
  - lib/httpx/plugins/persistent.rb
233
320
  - lib/httpx/plugins/proxy.rb
234
321
  - lib/httpx/plugins/proxy/http.rb
@@ -238,16 +325,20 @@ files:
238
325
  - lib/httpx/plugins/push_promise.rb
239
326
  - lib/httpx/plugins/rate_limiter.rb
240
327
  - lib/httpx/plugins/response_cache.rb
328
+ - lib/httpx/plugins/response_cache/file_store.rb
241
329
  - lib/httpx/plugins/response_cache/store.rb
242
330
  - lib/httpx/plugins/retries.rb
331
+ - lib/httpx/plugins/ssrf_filter.rb
243
332
  - lib/httpx/plugins/stream.rb
244
333
  - lib/httpx/plugins/upgrade.rb
245
334
  - lib/httpx/plugins/upgrade/h2.rb
335
+ - lib/httpx/plugins/webdav.rb
246
336
  - lib/httpx/pmatch_extensions.rb
247
337
  - lib/httpx/pool.rb
338
+ - lib/httpx/pool/synch_pool.rb
248
339
  - lib/httpx/punycode.rb
249
- - lib/httpx/registry.rb
250
340
  - lib/httpx/request.rb
341
+ - lib/httpx/request/body.rb
251
342
  - lib/httpx/resolver.rb
252
343
  - lib/httpx/resolver/https.rb
253
344
  - lib/httpx/resolver/multi.rb
@@ -255,6 +346,8 @@ files:
255
346
  - lib/httpx/resolver/resolver.rb
256
347
  - lib/httpx/resolver/system.rb
257
348
  - lib/httpx/response.rb
349
+ - lib/httpx/response/body.rb
350
+ - lib/httpx/response/buffer.rb
258
351
  - lib/httpx/selector.rb
259
352
  - lib/httpx/session.rb
260
353
  - lib/httpx/session2.rb
@@ -263,10 +356,22 @@ files:
263
356
  - lib/httpx/transcoder.rb
264
357
  - lib/httpx/transcoder/body.rb
265
358
  - lib/httpx/transcoder/chunker.rb
359
+ - lib/httpx/transcoder/deflate.rb
266
360
  - lib/httpx/transcoder/form.rb
361
+ - lib/httpx/transcoder/gzip.rb
267
362
  - lib/httpx/transcoder/json.rb
363
+ - lib/httpx/transcoder/multipart.rb
364
+ - lib/httpx/transcoder/multipart/decoder.rb
365
+ - lib/httpx/transcoder/multipart/encoder.rb
366
+ - lib/httpx/transcoder/multipart/mime_type_detector.rb
367
+ - lib/httpx/transcoder/multipart/part.rb
368
+ - lib/httpx/transcoder/utils/body_reader.rb
369
+ - lib/httpx/transcoder/utils/deflater.rb
370
+ - lib/httpx/transcoder/utils/inflater.rb
371
+ - lib/httpx/transcoder/xml.rb
268
372
  - lib/httpx/utils.rb
269
373
  - lib/httpx/version.rb
374
+ - sig/altsvc.rbs
270
375
  - sig/buffer.rbs
271
376
  - sig/callbacks.rbs
272
377
  - sig/chainable.rbs
@@ -277,31 +382,39 @@ files:
277
382
  - sig/errors.rbs
278
383
  - sig/headers.rbs
279
384
  - sig/httpx.rbs
385
+ - sig/io.rbs
386
+ - sig/io/ssl.rbs
387
+ - sig/io/tcp.rbs
388
+ - sig/io/udp.rbs
389
+ - sig/io/unix.rbs
280
390
  - sig/loggable.rbs
281
391
  - sig/options.rbs
282
392
  - sig/parser/http1.rbs
283
- - sig/plugins/authentication.rbs
284
- - sig/plugins/authentication/basic.rbs
285
- - sig/plugins/authentication/digest.rbs
286
- - sig/plugins/authentication/ntlm.rbs
287
- - sig/plugins/authentication/socks5.rbs
393
+ - sig/plugins/auth.rbs
394
+ - sig/plugins/auth/basic.rbs
395
+ - sig/plugins/auth/digest.rbs
396
+ - sig/plugins/auth/ntlm.rbs
397
+ - sig/plugins/auth/socks5.rbs
288
398
  - sig/plugins/aws_sdk_authentication.rbs
289
399
  - sig/plugins/aws_sigv4.rbs
290
- - sig/plugins/basic_authentication.rbs
400
+ - sig/plugins/basic_auth.rbs
401
+ - sig/plugins/brotli.rbs
402
+ - sig/plugins/callbacks.rbs
403
+ - sig/plugins/circuit_breaker.rbs
291
404
  - sig/plugins/compression.rbs
292
- - sig/plugins/compression/brotli.rbs
293
- - sig/plugins/compression/deflate.rbs
294
- - sig/plugins/compression/gzip.rbs
295
405
  - sig/plugins/cookies.rbs
296
406
  - sig/plugins/cookies/cookie.rbs
297
407
  - sig/plugins/cookies/jar.rbs
298
- - sig/plugins/digest_authentication.rbs
408
+ - sig/plugins/digest_auth.rbs
299
409
  - sig/plugins/expect.rbs
300
410
  - sig/plugins/follow_redirects.rbs
301
411
  - sig/plugins/grpc.rbs
412
+ - sig/plugins/grpc/call.rbs
413
+ - sig/plugins/grpc/grpc_encoding.rbs
414
+ - sig/plugins/grpc/message.rbs
302
415
  - sig/plugins/h2c.rbs
303
- - sig/plugins/multipart.rbs
304
- - sig/plugins/ntlm_authentication.rbs
416
+ - sig/plugins/ntlm_auth.rbs
417
+ - sig/plugins/oauth.rbs
305
418
  - sig/plugins/persistent.rbs
306
419
  - sig/plugins/proxy.rbs
307
420
  - sig/plugins/proxy/http.rbs
@@ -315,8 +428,8 @@ files:
315
428
  - sig/plugins/stream.rbs
316
429
  - sig/plugins/upgrade.rbs
317
430
  - sig/pool.rbs
318
- - sig/registry.rbs
319
431
  - sig/request.rbs
432
+ - sig/request/body.rbs
320
433
  - sig/resolver.rbs
321
434
  - sig/resolver/https.rbs
322
435
  - sig/resolver/multi.rbs
@@ -324,23 +437,32 @@ files:
324
437
  - sig/resolver/resolver.rbs
325
438
  - sig/resolver/system.rbs
326
439
  - sig/response.rbs
440
+ - sig/response/body.rbs
441
+ - sig/response/buffer.rbs
327
442
  - sig/selector.rbs
328
443
  - sig/session.rbs
329
444
  - sig/timers.rbs
330
445
  - sig/transcoder.rbs
331
446
  - sig/transcoder/body.rbs
332
447
  - sig/transcoder/chunker.rbs
448
+ - sig/transcoder/deflate.rbs
333
449
  - sig/transcoder/form.rbs
450
+ - sig/transcoder/gzip.rbs
334
451
  - sig/transcoder/json.rbs
452
+ - sig/transcoder/multipart.rbs
453
+ - sig/transcoder/utils/body_reader.rbs
454
+ - sig/transcoder/utils/deflater.rbs
455
+ - sig/transcoder/utils/inflater.rbs
456
+ - sig/transcoder/xml.rbs
335
457
  - sig/utils.rbs
336
- homepage: https://gitlab.com/honeyryderchuck/httpx
458
+ homepage: https://gitlab.com/os85/httpx
337
459
  licenses:
338
460
  - Apache 2.0
339
461
  metadata:
340
- bug_tracker_uri: https://gitlab.com/honeyryderchuck/httpx/issues
462
+ bug_tracker_uri: https://gitlab.com/os85/httpx/issues
341
463
  changelog_uri: https://honeyryderchuck.gitlab.io/httpx/#release-notes
342
464
  documentation_uri: https://honeyryderchuck.gitlab.io/httpx/rdoc/
343
- source_code_uri: https://gitlab.com/honeyryderchuck/httpx
465
+ source_code_uri: https://gitlab.com/os85/httpx
344
466
  homepage_uri: https://honeyryderchuck.gitlab.io/httpx/
345
467
  rubygems_mfa_required: 'true'
346
468
  post_install_message:
@@ -351,14 +473,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
473
  requirements:
352
474
  - - ">="
353
475
  - !ruby/object:Gem::Version
354
- version: '0'
476
+ version: 2.7.0
355
477
  required_rubygems_version: !ruby/object:Gem::Requirement
356
478
  requirements:
357
479
  - - ">="
358
480
  - !ruby/object:Gem::Version
359
481
  version: '0'
360
482
  requirements: []
361
- rubygems_version: 3.2.32
483
+ rubygems_version: 3.4.10
362
484
  signing_key:
363
485
  specification_version: 4
364
486
  summary: HTTPX, to the future, and beyond
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module HTTPX
4
- module Plugins
5
- #
6
- # This plugin adds a shim +authentication+ method to the session, which will fill
7
- # the HTTP Authorization header.
8
- #
9
- # https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#authentication
10
- #
11
- module Authentication
12
- module InstanceMethods
13
- def authentication(token)
14
- with(headers: { "authorization" => token })
15
- end
16
- end
17
- end
18
- register_plugin :authentication, Authentication
19
- end
20
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module HTTPX
4
- module Plugins
5
- #
6
- # This plugin adds helper methods to implement HTTP Basic Auth (https://tools.ietf.org/html/rfc7617)
7
- #
8
- # https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#basic-authentication
9
- #
10
- module BasicAuth
11
- class << self
12
- def load_dependencies(_klass)
13
- require_relative "authentication/basic"
14
- end
15
-
16
- def configure(klass)
17
- klass.plugin(:authentication)
18
- end
19
- end
20
-
21
- module InstanceMethods
22
- def basic_auth(user, password)
23
- authentication(Authentication::Basic.new(user, password).authenticate)
24
- end
25
- alias_method :basic_authentication, :basic_auth
26
- end
27
- end
28
- register_plugin :basic_authentication, BasicAuth
29
- end
30
- end
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module HTTPX
4
- module Plugins
5
- module Compression
6
- module Brotli
7
- class << self
8
- def load_dependencies(_klass)
9
- require "brotli"
10
- end
11
-
12
- def configure(klass)
13
- klass.plugin(:compression)
14
- klass.default_options.encodings.register "br", self
15
- end
16
- end
17
-
18
- module Deflater
19
- module_function
20
-
21
- def deflate(raw, buffer = "".b, chunk_size: 16_384)
22
- while (chunk = raw.read(chunk_size))
23
- compressed = ::Brotli.deflate(chunk)
24
- buffer << compressed
25
- yield compressed if block_given?
26
- end
27
- buffer
28
- end
29
- end
30
-
31
- class Inflater
32
- def initialize(bytesize)
33
- @bytesize = bytesize
34
- end
35
-
36
- def inflate(chunk)
37
- ::Brotli.inflate(chunk)
38
- end
39
- end
40
-
41
- module_function
42
-
43
- def deflater
44
- Deflater
45
- end
46
-
47
- def inflater(bytesize)
48
- Inflater.new(bytesize)
49
- end
50
- end
51
- end
52
- register_plugin :"compression/brotli", Compression::Brotli
53
- end
54
- end
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module HTTPX
4
- module Plugins
5
- module Compression
6
- module Deflate
7
- def self.load_dependencies(_klass)
8
- require "stringio"
9
- require "zlib"
10
- end
11
-
12
- def self.configure(klass)
13
- klass.plugin(:"compression/gzip")
14
- klass.default_options.encodings.register "deflate", self
15
- end
16
-
17
- module Deflater
18
- module_function
19
-
20
- def deflate(raw, buffer = "".b, chunk_size: 16_384)
21
- deflater = Zlib::Deflate.new
22
- while (chunk = raw.read(chunk_size))
23
- compressed = deflater.deflate(chunk)
24
- buffer << compressed
25
- yield compressed if block_given?
26
- end
27
- last = deflater.finish
28
- buffer << last
29
- yield last if block_given?
30
- buffer
31
- ensure
32
- deflater.close if deflater
33
- end
34
- end
35
-
36
- module_function
37
-
38
- def deflater
39
- Deflater
40
- end
41
-
42
- def inflater(bytesize)
43
- GZIP::Inflater.new(bytesize)
44
- end
45
- end
46
- end
47
- register_plugin :"compression/deflate", Compression::Deflate
48
- end
49
- end
@@ -1,88 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "forwardable"
4
-
5
- module HTTPX
6
- module Plugins
7
- module Compression
8
- module GZIP
9
- def self.load_dependencies(*)
10
- require "zlib"
11
- end
12
-
13
- def self.configure(klass)
14
- klass.default_options.encodings.register "gzip", self
15
- end
16
-
17
- class Deflater
18
- def initialize
19
- @compressed_chunk = "".b
20
- end
21
-
22
- def deflate(raw, buffer = "".b, chunk_size: 16_384)
23
- gzip = Zlib::GzipWriter.new(self)
24
-
25
- begin
26
- while (chunk = raw.read(chunk_size))
27
- gzip.write(chunk)
28
- gzip.flush
29
- compressed = compressed_chunk
30
- buffer << compressed
31
- yield compressed if block_given?
32
- end
33
- ensure
34
- gzip.close
35
- end
36
-
37
- return unless (compressed = compressed_chunk)
38
-
39
- buffer << compressed
40
- yield compressed if block_given?
41
- buffer
42
- end
43
-
44
- private
45
-
46
- def write(chunk)
47
- @compressed_chunk << chunk
48
- end
49
-
50
- def compressed_chunk
51
- @compressed_chunk.dup
52
- ensure
53
- @compressed_chunk.clear
54
- end
55
- end
56
-
57
- class Inflater
58
- def initialize(bytesize)
59
- @inflater = Zlib::Inflate.new(32 + Zlib::MAX_WBITS)
60
- @bytesize = bytesize
61
- @buffer = nil
62
- end
63
-
64
- def inflate(chunk)
65
- buffer = @inflater.inflate(chunk)
66
- @bytesize -= chunk.bytesize
67
- if @bytesize <= 0
68
- buffer << @inflater.finish
69
- @inflater.close
70
- end
71
- buffer
72
- end
73
- end
74
-
75
- module_function
76
-
77
- def deflater
78
- Deflater.new
79
- end
80
-
81
- def inflater(bytesize)
82
- Inflater.new(bytesize)
83
- end
84
- end
85
- end
86
- register_plugin :"compression/gzip", Compression::GZIP
87
- end
88
- end