httpx 0.19.7 → 0.20.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/doc/release_notes/0_19_8.md +5 -0
- data/doc/release_notes/0_20_0.md +36 -0
- data/doc/release_notes/0_20_1.md +5 -0
- data/lib/httpx/adapters/datadog.rb +112 -58
- data/lib/httpx/adapters/sentry.rb +102 -0
- data/lib/httpx/connection.rb +10 -2
- data/lib/httpx/io/ssl.rb +8 -3
- data/lib/httpx/options.rb +5 -0
- data/lib/httpx/plugins/authentication/basic.rb +24 -0
- data/lib/httpx/plugins/authentication/digest.rb +102 -0
- data/lib/httpx/plugins/authentication/ntlm.rb +37 -0
- data/lib/httpx/plugins/authentication/socks5.rb +24 -0
- data/lib/httpx/plugins/basic_authentication.rb +6 -6
- data/lib/httpx/plugins/digest_authentication.rb +15 -111
- data/lib/httpx/plugins/follow_redirects.rb +17 -5
- data/lib/httpx/plugins/ntlm_authentication.rb +8 -18
- data/lib/httpx/plugins/proxy/http.rb +76 -13
- data/lib/httpx/plugins/proxy/socks5.rb +6 -4
- data/lib/httpx/plugins/proxy.rb +30 -8
- data/lib/httpx/plugins/response_cache/store.rb +1 -0
- data/lib/httpx/pool.rb +4 -4
- data/lib/httpx/request.rb +3 -1
- data/lib/httpx/session.rb +7 -2
- data/lib/httpx/version.rb +1 -1
- data/sig/chainable.rbs +4 -4
- data/sig/plugins/authentication/basic.rbs +19 -0
- data/sig/plugins/authentication/digest.rbs +24 -0
- data/sig/plugins/authentication/ntlm.rbs +20 -0
- data/sig/plugins/authentication/socks5.rbs +18 -0
- data/sig/plugins/basic_authentication.rbs +2 -2
- data/sig/plugins/digest_authentication.rbs +3 -13
- data/sig/plugins/ntlm_authentication.rbs +3 -8
- data/sig/plugins/proxy/http.rbs +13 -3
- data/sig/plugins/proxy.rbs +5 -3
- data/sig/pool.rbs +2 -2
- data/sig/selector.rbs +1 -1
- data/sig/session.rbs +1 -1
- metadata +17 -2
@@ -0,0 +1,24 @@
|
|
1
|
+
module HTTPX
|
2
|
+
module Plugins
|
3
|
+
module Authentication
|
4
|
+
class Digest
|
5
|
+
@user: String
|
6
|
+
@password: String
|
7
|
+
|
8
|
+
def can_authenticate?: (String? authenticate) -> boolish
|
9
|
+
|
10
|
+
def authenticate: (Request request, String authenticate) -> String
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def generate_header: (String meth, String uri, String authenticate) -> String
|
15
|
+
|
16
|
+
def initialize: (string user, string password) -> void
|
17
|
+
|
18
|
+
def make_cnonce: () -> String
|
19
|
+
|
20
|
+
def next_nonce: () -> Integer
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module HTTPX
|
2
|
+
module Plugins
|
3
|
+
module Authentication
|
4
|
+
class Ntlm
|
5
|
+
@user: String
|
6
|
+
@password: String
|
7
|
+
@domain: String?
|
8
|
+
|
9
|
+
def can_authenticate?: (String? authenticate) -> boolish
|
10
|
+
|
11
|
+
def authenticate: (Request request, String authenticate) -> String
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def initialize: (string user, string password, ?domain: String?) -> void
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module HTTPX
|
2
|
+
module Plugins
|
3
|
+
module Authentication
|
4
|
+
class Socks5
|
5
|
+
@user: String
|
6
|
+
@password: String
|
7
|
+
|
8
|
+
def can_authenticate?: (*untyped) -> boolish
|
9
|
+
|
10
|
+
def authenticate: (*untyped) -> String
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def initialize: (string user, string password) -> void
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module HTTPX
|
2
2
|
module Plugins
|
3
|
-
module
|
3
|
+
module BasicAuth
|
4
4
|
def self.load_dependencies: (singleton(Session)) -> void
|
5
5
|
|
6
6
|
def self.configure: (singleton(Session)) -> void
|
@@ -10,6 +10,6 @@ module HTTPX
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
type
|
13
|
+
type sessionBasicAuth = sessionAuthentication & Authentication::InstanceMethods & BasicAuth::InstanceMethods
|
14
14
|
end
|
15
15
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module HTTPX
|
2
2
|
module Plugins
|
3
|
-
module
|
3
|
+
module DigestAuth
|
4
4
|
DigestError: singleton(Error)
|
5
5
|
|
6
6
|
interface _DigestOptions
|
7
|
-
def digest: () -> Digest?
|
7
|
+
def digest: () -> Authentication::Digest?
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.extra_options: (Options) -> (Options & _DigestOptions)
|
@@ -14,18 +14,8 @@ module HTTPX
|
|
14
14
|
module InstanceMethods
|
15
15
|
def digest_authentication: (string user, string password) -> instance
|
16
16
|
end
|
17
|
-
|
18
|
-
class Digest
|
19
|
-
def generate_header: (Request, Response, ?bool?) -> String
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def initialize: (string user, string password) -> untyped
|
24
|
-
def make_cnonce: () -> String
|
25
|
-
def next_nonce: () -> Integer
|
26
|
-
end
|
27
17
|
end
|
28
18
|
|
29
|
-
type
|
19
|
+
type sessionDigestAuth = sessionAuthentication & DigestAuth::InstanceMethods
|
30
20
|
end
|
31
21
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module HTTPX
|
2
2
|
module Plugins
|
3
|
-
module
|
3
|
+
module NTLMAuth
|
4
4
|
|
5
5
|
interface _NTLMOptions
|
6
|
-
def ntlm: () ->
|
6
|
+
def ntlm: () -> Authentication::Ntlm?
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.extra_options: (Options) -> (Options & _NTLMOptions)
|
@@ -14,13 +14,8 @@ module HTTPX
|
|
14
14
|
def ntlm_authentication: (string user, string password, ?string? domain) -> instance
|
15
15
|
end
|
16
16
|
|
17
|
-
class NTLMParams
|
18
|
-
attr_reader user: String
|
19
|
-
attr_reader password: String
|
20
|
-
attr_reader domain: String?
|
21
|
-
end
|
22
17
|
end
|
23
18
|
|
24
|
-
type
|
19
|
+
type sessionNTLMAuth = sessionAuthentication & NTLMAuth::InstanceMethods
|
25
20
|
end
|
26
21
|
end
|
data/sig/plugins/proxy/http.rbs
CHANGED
@@ -2,13 +2,23 @@ module HTTPX
|
|
2
2
|
module Plugins
|
3
3
|
module Proxy
|
4
4
|
module HTTP
|
5
|
-
|
5
|
+
|
6
|
+
module InstanceMethods
|
7
|
+
def with_proxy_basic_auth: (Hash[Symbol, untyped] opts) -> instance
|
8
|
+
|
9
|
+
def with_proxy_digest_auth: (Hash[Symbol, untyped] opts) -> instance
|
10
|
+
|
11
|
+
def with_proxy_ntlm_auth: (Hash[Symbol, untyped] opts) -> instance
|
12
|
+
end
|
13
|
+
|
6
14
|
module ConnectionMethods
|
7
|
-
def __http_proxy_connect: () -> void
|
15
|
+
def __http_proxy_connect: (Connection::_Parser parser) -> void
|
8
16
|
def __http_on_connect: (top, Response) -> void
|
9
17
|
end
|
10
|
-
|
18
|
+
|
11
19
|
end
|
12
20
|
end
|
21
|
+
|
22
|
+
type httpProxy = Session & Proxy::HTTP::InstanceMethods
|
13
23
|
end
|
14
24
|
end
|
data/sig/plugins/proxy.rbs
CHANGED
@@ -11,15 +11,17 @@ module HTTPX
|
|
11
11
|
attr_reader uri: URI::Generic
|
12
12
|
attr_reader username: String?
|
13
13
|
attr_reader password: String?
|
14
|
+
attr_reader scheme: String?
|
14
15
|
|
15
|
-
def
|
16
|
-
|
16
|
+
def can_authenticate?: (*untyped) -> boolish
|
17
|
+
|
18
|
+
def authenticate: (*untyped) -> String?
|
17
19
|
|
18
20
|
def ==: (untyped) -> bool
|
19
21
|
|
20
22
|
private
|
21
23
|
|
22
|
-
def initialize: (uri: generic_uri, ?username: String, ?password: String) -> untyped
|
24
|
+
def initialize: (uri: generic_uri, ?scheme: String, ?username: String, ?password: String, **extra) -> untyped
|
23
25
|
end
|
24
26
|
|
25
27
|
def self.configure: (singleton(Session)) -> void
|
data/sig/pool.rbs
CHANGED
@@ -36,9 +36,9 @@ module HTTPX
|
|
36
36
|
|
37
37
|
def unregister_connection: (Connection) -> void
|
38
38
|
|
39
|
-
def select_connection: (
|
39
|
+
def select_connection: (Selector::selectable) -> void
|
40
40
|
|
41
|
-
def deselect_connection: (
|
41
|
+
def deselect_connection: (Selector::selectable) -> Selector::selectable?
|
42
42
|
|
43
43
|
def coalesce_connections: (Connection coalescable, Connection coalescing) -> void
|
44
44
|
|
data/sig/selector.rbs
CHANGED
data/sig/session.rbs
CHANGED
@@ -33,7 +33,7 @@ module HTTPX
|
|
33
33
|
|
34
34
|
def set_connection_callbacks: (Connection, Array[Connection], Options) -> void
|
35
35
|
|
36
|
-
def build_altsvc_connection: (Connection, Array[Connection], URI::Generic, String, Hash[String, String], Options) -> Connection?
|
36
|
+
def build_altsvc_connection: (Connection existing_connection, Array[Connection] connections, URI::Generic alt_origin, String origin, Hash[String, String] alt_params, Options options) -> Connection?
|
37
37
|
|
38
38
|
def build_requests: (verb | string, uri, options) -> Array[Request]
|
39
39
|
| (Array[[verb | string, uri, options]], options) -> Array[Request]
|
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.
|
4
|
+
version: 0.20.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-
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-2-next
|
@@ -78,7 +78,10 @@ extra_rdoc_files:
|
|
78
78
|
- doc/release_notes/0_19_5.md
|
79
79
|
- doc/release_notes/0_19_6.md
|
80
80
|
- doc/release_notes/0_19_7.md
|
81
|
+
- doc/release_notes/0_19_8.md
|
81
82
|
- doc/release_notes/0_1_0.md
|
83
|
+
- doc/release_notes/0_20_0.md
|
84
|
+
- doc/release_notes/0_20_1.md
|
82
85
|
- doc/release_notes/0_2_0.md
|
83
86
|
- doc/release_notes/0_2_1.md
|
84
87
|
- doc/release_notes/0_3_0.md
|
@@ -149,7 +152,10 @@ files:
|
|
149
152
|
- doc/release_notes/0_19_5.md
|
150
153
|
- doc/release_notes/0_19_6.md
|
151
154
|
- doc/release_notes/0_19_7.md
|
155
|
+
- doc/release_notes/0_19_8.md
|
152
156
|
- doc/release_notes/0_1_0.md
|
157
|
+
- doc/release_notes/0_20_0.md
|
158
|
+
- doc/release_notes/0_20_1.md
|
153
159
|
- doc/release_notes/0_2_0.md
|
154
160
|
- doc/release_notes/0_2_1.md
|
155
161
|
- doc/release_notes/0_3_0.md
|
@@ -174,6 +180,7 @@ files:
|
|
174
180
|
- lib/httpx.rb
|
175
181
|
- lib/httpx/adapters/datadog.rb
|
176
182
|
- lib/httpx/adapters/faraday.rb
|
183
|
+
- lib/httpx/adapters/sentry.rb
|
177
184
|
- lib/httpx/adapters/webmock.rb
|
178
185
|
- lib/httpx/altsvc.rb
|
179
186
|
- lib/httpx/buffer.rb
|
@@ -195,6 +202,10 @@ files:
|
|
195
202
|
- lib/httpx/options.rb
|
196
203
|
- lib/httpx/parser/http1.rb
|
197
204
|
- lib/httpx/plugins/authentication.rb
|
205
|
+
- lib/httpx/plugins/authentication/basic.rb
|
206
|
+
- lib/httpx/plugins/authentication/digest.rb
|
207
|
+
- lib/httpx/plugins/authentication/ntlm.rb
|
208
|
+
- lib/httpx/plugins/authentication/socks5.rb
|
198
209
|
- lib/httpx/plugins/aws_sdk_authentication.rb
|
199
210
|
- lib/httpx/plugins/aws_sigv4.rb
|
200
211
|
- lib/httpx/plugins/basic_authentication.rb
|
@@ -272,6 +283,10 @@ files:
|
|
272
283
|
- sig/options.rbs
|
273
284
|
- sig/parser/http1.rbs
|
274
285
|
- sig/plugins/authentication.rbs
|
286
|
+
- sig/plugins/authentication/basic.rbs
|
287
|
+
- sig/plugins/authentication/digest.rbs
|
288
|
+
- sig/plugins/authentication/ntlm.rbs
|
289
|
+
- sig/plugins/authentication/socks5.rbs
|
275
290
|
- sig/plugins/aws_sdk_authentication.rbs
|
276
291
|
- sig/plugins/aws_sigv4.rbs
|
277
292
|
- sig/plugins/basic_authentication.rbs
|