httpx 0.8.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +48 -0
  3. data/README.md +9 -5
  4. data/doc/release_notes/0_0_1.md +7 -0
  5. data/doc/release_notes/0_0_2.md +9 -0
  6. data/doc/release_notes/0_0_3.md +9 -0
  7. data/doc/release_notes/0_0_4.md +7 -0
  8. data/doc/release_notes/0_0_5.md +5 -0
  9. data/doc/release_notes/0_10_0.md +66 -0
  10. data/doc/release_notes/0_10_1.md +37 -0
  11. data/doc/release_notes/0_10_2.md +5 -0
  12. data/doc/release_notes/0_1_0.md +9 -0
  13. data/doc/release_notes/0_2_0.md +5 -0
  14. data/doc/release_notes/0_2_1.md +16 -0
  15. data/doc/release_notes/0_3_0.md +12 -0
  16. data/doc/release_notes/0_3_1.md +6 -0
  17. data/doc/release_notes/0_4_0.md +51 -0
  18. data/doc/release_notes/0_4_1.md +3 -0
  19. data/doc/release_notes/0_5_0.md +15 -0
  20. data/doc/release_notes/0_5_1.md +14 -0
  21. data/doc/release_notes/0_6_0.md +5 -0
  22. data/doc/release_notes/0_6_1.md +6 -0
  23. data/doc/release_notes/0_6_2.md +6 -0
  24. data/doc/release_notes/0_6_3.md +13 -0
  25. data/doc/release_notes/0_6_4.md +21 -0
  26. data/doc/release_notes/0_6_5.md +22 -0
  27. data/doc/release_notes/0_6_6.md +19 -0
  28. data/doc/release_notes/0_6_7.md +5 -0
  29. data/doc/release_notes/0_7_0.md +46 -0
  30. data/doc/release_notes/0_8_0.md +27 -0
  31. data/doc/release_notes/0_8_1.md +8 -0
  32. data/doc/release_notes/0_8_2.md +7 -0
  33. data/doc/release_notes/0_9_0.md +38 -0
  34. data/lib/httpx.rb +2 -0
  35. data/lib/httpx/adapters/faraday.rb +1 -1
  36. data/lib/httpx/chainable.rb +11 -11
  37. data/lib/httpx/connection.rb +23 -31
  38. data/lib/httpx/connection/http1.rb +30 -4
  39. data/lib/httpx/connection/http2.rb +26 -9
  40. data/lib/httpx/domain_name.rb +440 -0
  41. data/lib/httpx/errors.rb +2 -1
  42. data/lib/httpx/extensions.rb +22 -2
  43. data/lib/httpx/headers.rb +1 -1
  44. data/lib/httpx/io/ssl.rb +0 -1
  45. data/lib/httpx/io/tcp.rb +6 -5
  46. data/lib/httpx/io/udp.rb +4 -1
  47. data/lib/httpx/options.rb +5 -1
  48. data/lib/httpx/parser/http1.rb +14 -17
  49. data/lib/httpx/plugins/compression.rb +46 -65
  50. data/lib/httpx/plugins/compression/brotli.rb +10 -14
  51. data/lib/httpx/plugins/compression/deflate.rb +7 -6
  52. data/lib/httpx/plugins/compression/gzip.rb +23 -5
  53. data/lib/httpx/plugins/cookies.rb +21 -60
  54. data/lib/httpx/plugins/cookies/cookie.rb +173 -0
  55. data/lib/httpx/plugins/cookies/jar.rb +74 -0
  56. data/lib/httpx/plugins/cookies/set_cookie_parser.rb +142 -0
  57. data/lib/httpx/plugins/expect.rb +12 -1
  58. data/lib/httpx/plugins/follow_redirects.rb +20 -2
  59. data/lib/httpx/plugins/h2c.rb +1 -1
  60. data/lib/httpx/plugins/multipart.rb +12 -6
  61. data/lib/httpx/plugins/persistent.rb +6 -1
  62. data/lib/httpx/plugins/proxy.rb +16 -2
  63. data/lib/httpx/plugins/proxy/socks4.rb +14 -14
  64. data/lib/httpx/plugins/rate_limiter.rb +51 -0
  65. data/lib/httpx/plugins/retries.rb +3 -2
  66. data/lib/httpx/plugins/stream.rb +109 -13
  67. data/lib/httpx/pool.rb +14 -20
  68. data/lib/httpx/request.rb +8 -20
  69. data/lib/httpx/resolver.rb +7 -10
  70. data/lib/httpx/resolver/https.rb +22 -24
  71. data/lib/httpx/resolver/native.rb +19 -16
  72. data/lib/httpx/resolver/resolver_mixin.rb +4 -2
  73. data/lib/httpx/resolver/system.rb +2 -2
  74. data/lib/httpx/response.rb +16 -25
  75. data/lib/httpx/selector.rb +11 -18
  76. data/lib/httpx/session.rb +40 -26
  77. data/lib/httpx/transcoder.rb +18 -0
  78. data/lib/httpx/transcoder/chunker.rb +0 -2
  79. data/lib/httpx/transcoder/form.rb +9 -7
  80. data/lib/httpx/transcoder/json.rb +0 -4
  81. data/lib/httpx/utils.rb +45 -0
  82. data/lib/httpx/version.rb +1 -1
  83. data/sig/buffer.rbs +24 -0
  84. data/sig/callbacks.rbs +14 -0
  85. data/sig/chainable.rbs +37 -0
  86. data/sig/connection.rbs +85 -0
  87. data/sig/connection/http1.rbs +66 -0
  88. data/sig/connection/http2.rbs +78 -0
  89. data/sig/domain_name.rbs +17 -0
  90. data/sig/errors.rbs +3 -0
  91. data/sig/headers.rbs +42 -0
  92. data/sig/httpx.rbs +15 -0
  93. data/sig/loggable.rbs +11 -0
  94. data/sig/missing.rbs +12 -0
  95. data/sig/options.rbs +118 -0
  96. data/sig/parser/http1.rbs +50 -0
  97. data/sig/plugins/authentication.rbs +11 -0
  98. data/sig/plugins/basic_authentication.rbs +13 -0
  99. data/sig/plugins/compression.rbs +55 -0
  100. data/sig/plugins/compression/brotli.rbs +21 -0
  101. data/sig/plugins/compression/deflate.rbs +17 -0
  102. data/sig/plugins/compression/gzip.rbs +29 -0
  103. data/sig/plugins/cookies.rbs +26 -0
  104. data/sig/plugins/cookies/cookie.rbs +50 -0
  105. data/sig/plugins/cookies/jar.rbs +27 -0
  106. data/sig/plugins/digest_authentication.rbs +33 -0
  107. data/sig/plugins/expect.rbs +19 -0
  108. data/sig/plugins/follow_redirects.rbs +37 -0
  109. data/sig/plugins/h2c.rbs +26 -0
  110. data/sig/plugins/multipart.rbs +21 -0
  111. data/sig/plugins/persistent.rbs +17 -0
  112. data/sig/plugins/proxy.rbs +47 -0
  113. data/sig/plugins/proxy/http.rbs +14 -0
  114. data/sig/plugins/proxy/socks4.rbs +33 -0
  115. data/sig/plugins/proxy/socks5.rbs +36 -0
  116. data/sig/plugins/proxy/ssh.rbs +18 -0
  117. data/sig/plugins/push_promise.rbs +22 -0
  118. data/sig/plugins/rate_limiter.rbs +11 -0
  119. data/sig/plugins/retries.rbs +48 -0
  120. data/sig/plugins/stream.rbs +39 -0
  121. data/sig/pool.rbs +36 -0
  122. data/sig/registry.rbs +9 -0
  123. data/sig/request.rbs +61 -0
  124. data/sig/resolver.rbs +26 -0
  125. data/sig/resolver/https.rbs +49 -0
  126. data/sig/resolver/native.rbs +60 -0
  127. data/sig/resolver/resolver_mixin.rbs +27 -0
  128. data/sig/resolver/system.rbs +17 -0
  129. data/sig/response.rbs +87 -0
  130. data/sig/selector.rbs +20 -0
  131. data/sig/session.rbs +49 -0
  132. data/sig/timeout.rbs +29 -0
  133. data/sig/transcoder.rbs +18 -0
  134. data/sig/transcoder/body.rbs +18 -0
  135. data/sig/transcoder/chunker.rbs +32 -0
  136. data/sig/transcoder/form.rbs +16 -0
  137. data/sig/transcoder/json.rbs +14 -0
  138. metadata +130 -22
  139. data/lib/httpx/resolver/options.rb +0 -25
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module HTTPX
4
- class Resolver::Options
5
- def initialize(options = {})
6
- @options = options
7
- end
8
-
9
- def method_missing(m, *, &block)
10
- if @options.key?(m)
11
- @options[m]
12
- else
13
- super
14
- end
15
- end
16
-
17
- def respond_to_missing?(m, *)
18
- @options.key?(m) || super
19
- end
20
-
21
- def to_h
22
- @options
23
- end
24
- end
25
- end