httpx 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -3
  3. data/doc/release_notes/0_11_0.md +76 -0
  4. data/lib/httpx/adapters/datadog.rb +205 -0
  5. data/lib/httpx/adapters/faraday.rb +0 -2
  6. data/lib/httpx/adapters/webmock.rb +123 -0
  7. data/lib/httpx/chainable.rb +1 -1
  8. data/lib/httpx/connection/http2.rb +4 -4
  9. data/lib/httpx/domain_name.rb +1 -3
  10. data/lib/httpx/errors.rb +2 -0
  11. data/lib/httpx/headers.rb +1 -0
  12. data/lib/httpx/io/ssl.rb +4 -8
  13. data/lib/httpx/io/udp.rb +1 -1
  14. data/lib/httpx/plugins/expect.rb +33 -8
  15. data/lib/httpx/plugins/multipart.rb +40 -35
  16. data/lib/httpx/plugins/multipart/encoder.rb +115 -0
  17. data/lib/httpx/plugins/multipart/mime_type_detector.rb +64 -0
  18. data/lib/httpx/plugins/multipart/part.rb +34 -0
  19. data/lib/httpx/plugins/proxy/socks5.rb +3 -2
  20. data/lib/httpx/plugins/push_promise.rb +2 -2
  21. data/lib/httpx/request.rb +21 -11
  22. data/lib/httpx/resolver.rb +7 -4
  23. data/lib/httpx/resolver/https.rb +4 -2
  24. data/lib/httpx/resolver/native.rb +10 -6
  25. data/lib/httpx/resolver/system.rb +1 -1
  26. data/lib/httpx/selector.rb +1 -0
  27. data/lib/httpx/session.rb +15 -18
  28. data/lib/httpx/transcoder.rb +6 -4
  29. data/lib/httpx/version.rb +1 -1
  30. data/sig/connection/http2.rbs +3 -4
  31. data/sig/headers.rbs +3 -0
  32. data/sig/plugins/multipart.rbs +27 -4
  33. data/sig/request.rbs +1 -1
  34. data/sig/resolver/https.rbs +2 -0
  35. data/sig/response.rbs +1 -1
  36. data/sig/session.rbs +1 -1
  37. data/sig/transcoder.rbs +2 -2
  38. data/sig/transcoder/body.rbs +2 -0
  39. data/sig/transcoder/form.rbs +7 -1
  40. data/sig/transcoder/json.rbs +3 -1
  41. metadata +9 -23
  42. data/sig/missing.rbs +0 -12
@@ -7,6 +7,8 @@ module HTTPX
7
7
 
8
8
  @raw: bodyIO
9
9
 
10
+ def content_type: () -> String
11
+
10
12
  private
11
13
 
12
14
  def initialize: (untyped body ) -> untyped
@@ -1,5 +1,9 @@
1
1
  module HTTPX::Transcoder
2
- type urlencoded_input = Enumerable[[string, string], untyped]
2
+ type form_value = string
3
+
4
+ type form_nested_value = form_value | _ToAry[form_value] | _ToHash[string, form_value]
5
+
6
+ type urlencoded_input = Enumerable[[string, form_nested_value], untyped]
3
7
 
4
8
  module Form
5
9
  def self?.encode: (urlencoded_input form) -> Encoder
@@ -8,6 +12,8 @@ module HTTPX::Transcoder
8
12
  include _Encoder
9
13
  include _ToS
10
14
 
15
+ def content_type: () -> String
16
+
11
17
  private
12
18
 
13
19
  def initialize: (urlencoded_input form) -> untyped
@@ -6,9 +6,11 @@ module HTTPX::Transcoder
6
6
  include _Encoder
7
7
  include _ToS
8
8
 
9
+ def content_type: () -> String
10
+
9
11
  private
10
12
 
11
- def initalize: (_ToJson json) -> untyped
13
+ def initialize: (_ToJson json) -> untyped
12
14
  end
13
15
  end
14
16
  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.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2021-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-2-next
@@ -38,26 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: http-form_data
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 2.0.0
48
- - - "<"
49
- - !ruby/object:Gem::Version
50
- version: '3'
51
- type: :development
52
- prerelease: false
53
- version_requirements: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: 2.0.0
58
- - - "<"
59
- - !ruby/object:Gem::Version
60
- version: '3'
61
41
  description: A client library for making HTTP requests from Ruby.
62
42
  email:
63
43
  - cardoso_tiago@hotmail.com
@@ -80,6 +60,7 @@ extra_rdoc_files:
80
60
  - doc/release_notes/0_9_0.md
81
61
  - doc/release_notes/0_6_3.md
82
62
  - doc/release_notes/0_10_1.md
63
+ - doc/release_notes/0_11_0.md
83
64
  - doc/release_notes/0_8_1.md
84
65
  - doc/release_notes/0_5_0.md
85
66
  - doc/release_notes/0_6_7.md
@@ -107,6 +88,7 @@ files:
107
88
  - doc/release_notes/0_10_0.md
108
89
  - doc/release_notes/0_10_1.md
109
90
  - doc/release_notes/0_10_2.md
91
+ - doc/release_notes/0_11_0.md
110
92
  - doc/release_notes/0_1_0.md
111
93
  - doc/release_notes/0_2_0.md
112
94
  - doc/release_notes/0_2_1.md
@@ -130,7 +112,9 @@ files:
130
112
  - doc/release_notes/0_8_2.md
131
113
  - doc/release_notes/0_9_0.md
132
114
  - lib/httpx.rb
115
+ - lib/httpx/adapters/datadog.rb
133
116
  - lib/httpx/adapters/faraday.rb
117
+ - lib/httpx/adapters/webmock.rb
134
118
  - lib/httpx/altsvc.rb
135
119
  - lib/httpx/buffer.rb
136
120
  - lib/httpx/callbacks.rb
@@ -165,6 +149,9 @@ files:
165
149
  - lib/httpx/plugins/follow_redirects.rb
166
150
  - lib/httpx/plugins/h2c.rb
167
151
  - lib/httpx/plugins/multipart.rb
152
+ - lib/httpx/plugins/multipart/encoder.rb
153
+ - lib/httpx/plugins/multipart/mime_type_detector.rb
154
+ - lib/httpx/plugins/multipart/part.rb
168
155
  - lib/httpx/plugins/persistent.rb
169
156
  - lib/httpx/plugins/proxy.rb
170
157
  - lib/httpx/plugins/proxy/http.rb
@@ -205,7 +192,6 @@ files:
205
192
  - sig/headers.rbs
206
193
  - sig/httpx.rbs
207
194
  - sig/loggable.rbs
208
- - sig/missing.rbs
209
195
  - sig/options.rbs
210
196
  - sig/parser/http1.rbs
211
197
  - sig/plugins/authentication.rbs
@@ -1,12 +0,0 @@
1
- # defining these here, as I don't think there's hope of http-cookie to ever become type-friendly
2
- module HTTP
3
- class Cookie
4
- end
5
- class CookieJar
6
- end
7
- end
8
-
9
- module HTTP2Next
10
- class Stream
11
- end
12
- end