httpx-patched 1.6.2.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 +7 -0
- data/LICENSE.txt +191 -0
- data/README.md +162 -0
- data/doc/release_notes/0_0_1.md +7 -0
- data/doc/release_notes/0_0_2.md +9 -0
- data/doc/release_notes/0_0_3.md +9 -0
- data/doc/release_notes/0_0_4.md +7 -0
- data/doc/release_notes/0_0_5.md +5 -0
- data/doc/release_notes/0_10_0.md +66 -0
- data/doc/release_notes/0_10_1.md +37 -0
- data/doc/release_notes/0_10_2.md +5 -0
- data/doc/release_notes/0_11_0.md +74 -0
- data/doc/release_notes/0_11_1.md +5 -0
- data/doc/release_notes/0_11_2.md +5 -0
- data/doc/release_notes/0_11_3.md +5 -0
- data/doc/release_notes/0_12_0.md +55 -0
- data/doc/release_notes/0_13_0.md +58 -0
- data/doc/release_notes/0_13_1.md +5 -0
- data/doc/release_notes/0_13_2.md +9 -0
- data/doc/release_notes/0_14_0.md +79 -0
- data/doc/release_notes/0_14_1.md +7 -0
- data/doc/release_notes/0_14_2.md +6 -0
- data/doc/release_notes/0_14_3.md +5 -0
- data/doc/release_notes/0_14_4.md +5 -0
- data/doc/release_notes/0_14_5.md +11 -0
- data/doc/release_notes/0_15_0.md +53 -0
- data/doc/release_notes/0_15_1.md +8 -0
- data/doc/release_notes/0_15_2.md +9 -0
- data/doc/release_notes/0_15_3.md +5 -0
- data/doc/release_notes/0_15_4.md +5 -0
- data/doc/release_notes/0_16_0.md +93 -0
- data/doc/release_notes/0_16_1.md +5 -0
- data/doc/release_notes/0_17_0.md +49 -0
- data/doc/release_notes/0_18_0.md +69 -0
- data/doc/release_notes/0_18_1.md +12 -0
- data/doc/release_notes/0_18_2.md +10 -0
- data/doc/release_notes/0_18_3.md +7 -0
- data/doc/release_notes/0_18_4.md +14 -0
- data/doc/release_notes/0_18_5.md +10 -0
- data/doc/release_notes/0_18_6.md +5 -0
- data/doc/release_notes/0_18_7.md +5 -0
- data/doc/release_notes/0_19_0.md +39 -0
- data/doc/release_notes/0_19_1.md +5 -0
- data/doc/release_notes/0_19_2.md +7 -0
- data/doc/release_notes/0_19_3.md +6 -0
- data/doc/release_notes/0_19_4.md +14 -0
- data/doc/release_notes/0_19_5.md +13 -0
- data/doc/release_notes/0_19_6.md +5 -0
- data/doc/release_notes/0_19_7.md +5 -0
- data/doc/release_notes/0_19_8.md +5 -0
- data/doc/release_notes/0_1_0.md +9 -0
- data/doc/release_notes/0_20_0.md +36 -0
- data/doc/release_notes/0_20_1.md +5 -0
- data/doc/release_notes/0_20_2.md +7 -0
- data/doc/release_notes/0_20_3.md +6 -0
- data/doc/release_notes/0_20_4.md +17 -0
- data/doc/release_notes/0_20_5.md +3 -0
- data/doc/release_notes/0_21_0.md +96 -0
- data/doc/release_notes/0_21_1.md +12 -0
- data/doc/release_notes/0_22_0.md +13 -0
- data/doc/release_notes/0_22_1.md +11 -0
- data/doc/release_notes/0_22_2.md +5 -0
- data/doc/release_notes/0_22_3.md +55 -0
- data/doc/release_notes/0_22_4.md +6 -0
- data/doc/release_notes/0_22_5.md +6 -0
- data/doc/release_notes/0_23_0.md +42 -0
- data/doc/release_notes/0_23_1.md +5 -0
- data/doc/release_notes/0_23_2.md +5 -0
- data/doc/release_notes/0_23_3.md +6 -0
- data/doc/release_notes/0_23_4.md +5 -0
- data/doc/release_notes/0_24_0.md +48 -0
- data/doc/release_notes/0_24_1.md +12 -0
- data/doc/release_notes/0_24_2.md +12 -0
- data/doc/release_notes/0_24_3.md +12 -0
- data/doc/release_notes/0_24_4.md +18 -0
- data/doc/release_notes/0_24_5.md +6 -0
- data/doc/release_notes/0_24_6.md +5 -0
- data/doc/release_notes/0_24_7.md +10 -0
- data/doc/release_notes/0_2_0.md +5 -0
- data/doc/release_notes/0_2_1.md +16 -0
- data/doc/release_notes/0_3_0.md +12 -0
- data/doc/release_notes/0_3_1.md +6 -0
- data/doc/release_notes/0_4_0.md +51 -0
- data/doc/release_notes/0_4_1.md +3 -0
- data/doc/release_notes/0_5_0.md +15 -0
- data/doc/release_notes/0_5_1.md +14 -0
- data/doc/release_notes/0_6_0.md +5 -0
- data/doc/release_notes/0_6_1.md +6 -0
- data/doc/release_notes/0_6_2.md +6 -0
- data/doc/release_notes/0_6_3.md +13 -0
- data/doc/release_notes/0_6_4.md +21 -0
- data/doc/release_notes/0_6_5.md +22 -0
- data/doc/release_notes/0_6_6.md +19 -0
- data/doc/release_notes/0_6_7.md +5 -0
- data/doc/release_notes/0_7_0.md +46 -0
- data/doc/release_notes/0_8_0.md +27 -0
- data/doc/release_notes/0_8_1.md +8 -0
- data/doc/release_notes/0_8_2.md +7 -0
- data/doc/release_notes/0_9_0.md +38 -0
- data/doc/release_notes/1_0_0.md +60 -0
- data/doc/release_notes/1_0_1.md +5 -0
- data/doc/release_notes/1_0_2.md +7 -0
- data/doc/release_notes/1_1_0.md +32 -0
- data/doc/release_notes/1_1_1.md +17 -0
- data/doc/release_notes/1_1_2.md +12 -0
- data/doc/release_notes/1_1_3.md +18 -0
- data/doc/release_notes/1_1_4.md +6 -0
- data/doc/release_notes/1_1_5.md +12 -0
- data/doc/release_notes/1_2_0.md +49 -0
- data/doc/release_notes/1_2_1.md +6 -0
- data/doc/release_notes/1_2_2.md +10 -0
- data/doc/release_notes/1_2_3.md +16 -0
- data/doc/release_notes/1_2_4.md +8 -0
- data/doc/release_notes/1_2_5.md +7 -0
- data/doc/release_notes/1_2_6.md +13 -0
- data/doc/release_notes/1_3_0.md +18 -0
- data/doc/release_notes/1_3_1.md +17 -0
- data/doc/release_notes/1_3_2.md +6 -0
- data/doc/release_notes/1_3_3.md +5 -0
- data/doc/release_notes/1_3_4.md +6 -0
- data/doc/release_notes/1_4_0.md +43 -0
- data/doc/release_notes/1_4_1.md +19 -0
- data/doc/release_notes/1_4_2.md +20 -0
- data/doc/release_notes/1_4_3.md +11 -0
- data/doc/release_notes/1_4_4.md +14 -0
- data/doc/release_notes/1_5_0.md +126 -0
- data/doc/release_notes/1_5_1.md +6 -0
- data/doc/release_notes/1_6_0.md +50 -0
- data/doc/release_notes/1_6_1.md +17 -0
- data/doc/release_notes/1_6_2.md +11 -0
- data/lib/httpx/adapters/datadog.rb +359 -0
- data/lib/httpx/adapters/faraday.rb +303 -0
- data/lib/httpx/adapters/sentry.rb +121 -0
- data/lib/httpx/adapters/webmock.rb +175 -0
- data/lib/httpx/altsvc.rb +163 -0
- data/lib/httpx/base64.rb +27 -0
- data/lib/httpx/buffer.rb +61 -0
- data/lib/httpx/callbacks.rb +35 -0
- data/lib/httpx/chainable.rb +106 -0
- data/lib/httpx/connection/http1.rb +399 -0
- data/lib/httpx/connection/http2.rb +468 -0
- data/lib/httpx/connection.rb +954 -0
- data/lib/httpx/domain_name.rb +145 -0
- data/lib/httpx/errors.rb +111 -0
- data/lib/httpx/extensions.rb +59 -0
- data/lib/httpx/headers.rb +176 -0
- data/lib/httpx/io/ssl.rb +163 -0
- data/lib/httpx/io/tcp.rb +239 -0
- data/lib/httpx/io/udp.rb +62 -0
- data/lib/httpx/io/unix.rb +71 -0
- data/lib/httpx/io.rb +11 -0
- data/lib/httpx/loggable.rb +56 -0
- data/lib/httpx/options.rb +463 -0
- data/lib/httpx/parser/http1.rb +186 -0
- data/lib/httpx/plugins/auth/basic.rb +20 -0
- data/lib/httpx/plugins/auth/digest.rb +102 -0
- data/lib/httpx/plugins/auth/ntlm.rb +35 -0
- data/lib/httpx/plugins/auth/socks5.rb +22 -0
- data/lib/httpx/plugins/auth.rb +25 -0
- data/lib/httpx/plugins/aws_sdk_authentication.rb +111 -0
- data/lib/httpx/plugins/aws_sigv4.rb +239 -0
- data/lib/httpx/plugins/basic_auth.rb +29 -0
- data/lib/httpx/plugins/brotli.rb +50 -0
- data/lib/httpx/plugins/callbacks.rb +127 -0
- data/lib/httpx/plugins/circuit_breaker/circuit.rb +100 -0
- data/lib/httpx/plugins/circuit_breaker/circuit_store.rb +53 -0
- data/lib/httpx/plugins/circuit_breaker.rb +147 -0
- data/lib/httpx/plugins/content_digest.rb +204 -0
- data/lib/httpx/plugins/cookies/cookie.rb +174 -0
- data/lib/httpx/plugins/cookies/jar.rb +95 -0
- data/lib/httpx/plugins/cookies/set_cookie_parser.rb +143 -0
- data/lib/httpx/plugins/cookies.rb +107 -0
- data/lib/httpx/plugins/digest_auth.rb +67 -0
- data/lib/httpx/plugins/expect.rb +120 -0
- data/lib/httpx/plugins/fiber_concurrency.rb +195 -0
- data/lib/httpx/plugins/follow_redirects.rb +233 -0
- data/lib/httpx/plugins/grpc/call.rb +63 -0
- data/lib/httpx/plugins/grpc/grpc_encoding.rb +90 -0
- data/lib/httpx/plugins/grpc/message.rb +55 -0
- data/lib/httpx/plugins/grpc.rb +282 -0
- data/lib/httpx/plugins/h2c.rb +127 -0
- data/lib/httpx/plugins/internal_telemetry.rb +107 -0
- data/lib/httpx/plugins/ntlm_auth.rb +62 -0
- data/lib/httpx/plugins/oauth.rb +183 -0
- data/lib/httpx/plugins/persistent.rb +82 -0
- data/lib/httpx/plugins/proxy/http.rb +184 -0
- data/lib/httpx/plugins/proxy/socks4.rb +135 -0
- data/lib/httpx/plugins/proxy/socks5.rb +194 -0
- data/lib/httpx/plugins/proxy/ssh.rb +94 -0
- data/lib/httpx/plugins/proxy.rb +349 -0
- data/lib/httpx/plugins/push_promise.rb +81 -0
- data/lib/httpx/plugins/query.rb +35 -0
- data/lib/httpx/plugins/rate_limiter.rb +55 -0
- data/lib/httpx/plugins/response_cache/file_store.rb +140 -0
- data/lib/httpx/plugins/response_cache/store.rb +33 -0
- data/lib/httpx/plugins/response_cache.rb +333 -0
- data/lib/httpx/plugins/retries.rb +230 -0
- data/lib/httpx/plugins/ssrf_filter.rb +145 -0
- data/lib/httpx/plugins/stream.rb +183 -0
- data/lib/httpx/plugins/stream_bidi.rb +315 -0
- data/lib/httpx/plugins/upgrade/h2.rb +64 -0
- data/lib/httpx/plugins/upgrade.rb +86 -0
- data/lib/httpx/plugins/webdav.rb +86 -0
- data/lib/httpx/plugins/xml.rb +76 -0
- data/lib/httpx/pmatch_extensions.rb +33 -0
- data/lib/httpx/pool.rb +190 -0
- data/lib/httpx/punycode.rb +22 -0
- data/lib/httpx/request/body.rb +158 -0
- data/lib/httpx/request.rb +328 -0
- data/lib/httpx/resolver/entry.rb +30 -0
- data/lib/httpx/resolver/https.rb +256 -0
- data/lib/httpx/resolver/multi.rb +102 -0
- data/lib/httpx/resolver/native.rb +547 -0
- data/lib/httpx/resolver/resolver.rb +173 -0
- data/lib/httpx/resolver/system.rb +255 -0
- data/lib/httpx/resolver.rb +189 -0
- data/lib/httpx/response/body.rb +242 -0
- data/lib/httpx/response/buffer.rb +115 -0
- data/lib/httpx/response.rb +304 -0
- data/lib/httpx/selector.rb +282 -0
- data/lib/httpx/session.rb +612 -0
- data/lib/httpx/session_extensions.rb +30 -0
- data/lib/httpx/timers.rb +133 -0
- data/lib/httpx/transcoder/body.rb +43 -0
- data/lib/httpx/transcoder/chunker.rb +115 -0
- data/lib/httpx/transcoder/deflate.rb +37 -0
- data/lib/httpx/transcoder/form.rb +68 -0
- data/lib/httpx/transcoder/gzip.rb +71 -0
- data/lib/httpx/transcoder/json.rb +71 -0
- data/lib/httpx/transcoder/multipart/decoder.rb +141 -0
- data/lib/httpx/transcoder/multipart/encoder.rb +120 -0
- data/lib/httpx/transcoder/multipart/mime_type_detector.rb +78 -0
- data/lib/httpx/transcoder/multipart/part.rb +35 -0
- data/lib/httpx/transcoder/multipart.rb +31 -0
- data/lib/httpx/transcoder/utils/body_reader.rb +46 -0
- data/lib/httpx/transcoder/utils/deflater.rb +75 -0
- data/lib/httpx/transcoder.rb +91 -0
- data/lib/httpx/utils.rb +75 -0
- data/lib/httpx/version.rb +5 -0
- data/lib/httpx.rb +66 -0
- data/sig/altsvc.rbs +33 -0
- data/sig/buffer.rbs +27 -0
- data/sig/callbacks.rbs +15 -0
- data/sig/chainable.rbs +55 -0
- data/sig/connection/http1.rbs +85 -0
- data/sig/connection/http2.rbs +116 -0
- data/sig/connection.rbs +169 -0
- data/sig/domain_name.rbs +17 -0
- data/sig/errors.rbs +69 -0
- data/sig/headers.rbs +49 -0
- data/sig/httpx.rbs +27 -0
- data/sig/io/ssl.rbs +27 -0
- data/sig/io/tcp.rbs +72 -0
- data/sig/io/udp.rbs +25 -0
- data/sig/io/unix.rbs +26 -0
- data/sig/io.rbs +3 -0
- data/sig/loggable.rbs +17 -0
- data/sig/options.rbs +202 -0
- data/sig/parser/http1.rbs +59 -0
- data/sig/plugins/auth/basic.rbs +17 -0
- data/sig/plugins/auth/digest.rbs +25 -0
- data/sig/plugins/auth/ntlm.rbs +20 -0
- data/sig/plugins/auth/socks5.rbs +18 -0
- data/sig/plugins/auth.rbs +13 -0
- data/sig/plugins/aws_sdk_authentication.rbs +43 -0
- data/sig/plugins/aws_sigv4.rbs +78 -0
- data/sig/plugins/basic_auth.rbs +15 -0
- data/sig/plugins/brotli.rbs +22 -0
- data/sig/plugins/callbacks.rbs +38 -0
- data/sig/plugins/circuit_breaker.rbs +71 -0
- data/sig/plugins/compression.rbs +57 -0
- data/sig/plugins/content_digest.rbs +51 -0
- data/sig/plugins/cookies/cookie.rbs +55 -0
- data/sig/plugins/cookies/jar.rbs +26 -0
- data/sig/plugins/cookies/set_cookie_parser.rbs +22 -0
- data/sig/plugins/cookies.rbs +28 -0
- data/sig/plugins/digest_auth.rbs +21 -0
- data/sig/plugins/expect.rbs +15 -0
- data/sig/plugins/fiber_concurrency.rbs +51 -0
- data/sig/plugins/follow_redirects.rbs +47 -0
- data/sig/plugins/grpc/call.rbs +23 -0
- data/sig/plugins/grpc/grpc_encoding.rbs +37 -0
- data/sig/plugins/grpc/message.rbs +17 -0
- data/sig/plugins/grpc.rbs +65 -0
- data/sig/plugins/h2c.rbs +27 -0
- data/sig/plugins/ntlm_auth.rbs +21 -0
- data/sig/plugins/oauth.rbs +68 -0
- data/sig/plugins/persistent.rbs +14 -0
- data/sig/plugins/proxy/http.rbs +30 -0
- data/sig/plugins/proxy/socks4.rbs +37 -0
- data/sig/plugins/proxy/socks5.rbs +49 -0
- data/sig/plugins/proxy/ssh.rbs +18 -0
- data/sig/plugins/proxy.rbs +70 -0
- data/sig/plugins/push_promise.rbs +23 -0
- data/sig/plugins/query.rbs +18 -0
- data/sig/plugins/rate_limiter.rbs +13 -0
- data/sig/plugins/response_cache/file_store.rbs +19 -0
- data/sig/plugins/response_cache/store.rbs +13 -0
- data/sig/plugins/response_cache.rbs +86 -0
- data/sig/plugins/retries.rbs +66 -0
- data/sig/plugins/ssrf_filter.rbs +26 -0
- data/sig/plugins/stream.rbs +54 -0
- data/sig/plugins/stream_bidi.rbs +68 -0
- data/sig/plugins/upgrade/h2.rbs +9 -0
- data/sig/plugins/upgrade.rbs +29 -0
- data/sig/plugins/webdav.rbs +23 -0
- data/sig/plugins/xml.rbs +37 -0
- data/sig/pool.rbs +51 -0
- data/sig/punycode.rbs +5 -0
- data/sig/request/body.rbs +34 -0
- data/sig/request.rbs +88 -0
- data/sig/resolver/entry.rbs +13 -0
- data/sig/resolver/https.rbs +45 -0
- data/sig/resolver/multi.rbs +32 -0
- data/sig/resolver/native.rbs +74 -0
- data/sig/resolver/resolver.rbs +64 -0
- data/sig/resolver/system.rbs +34 -0
- data/sig/resolver.rbs +48 -0
- data/sig/response/body.rbs +52 -0
- data/sig/response/buffer.rbs +23 -0
- data/sig/response.rbs +103 -0
- data/sig/selector.rbs +68 -0
- data/sig/session.rbs +104 -0
- data/sig/timers.rbs +54 -0
- data/sig/transcoder/body.rbs +24 -0
- data/sig/transcoder/chunker.rbs +49 -0
- data/sig/transcoder/deflate.rbs +12 -0
- data/sig/transcoder/form.rbs +34 -0
- data/sig/transcoder/gzip.rbs +27 -0
- data/sig/transcoder/json.rbs +28 -0
- data/sig/transcoder/multipart.rbs +103 -0
- data/sig/transcoder/utils/body_reader.rbs +15 -0
- data/sig/transcoder/utils/deflater.rbs +28 -0
- data/sig/transcoder.rbs +43 -0
- data/sig/utils.rbs +19 -0
- metadata +518 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
#
|
|
4
|
+
# https://gitlab.com/os85/httpx/wikis/OAuth
|
|
5
|
+
#
|
|
6
|
+
module OAuth
|
|
7
|
+
def self.load_dependencies: (singleton(Session) klass) -> void
|
|
8
|
+
|
|
9
|
+
type grant_type = "client_credentials" | "refresh_token"
|
|
10
|
+
|
|
11
|
+
type token_auth_method = "client_secret_basic" | "client_secret_post"
|
|
12
|
+
|
|
13
|
+
SUPPORTED_GRANT_TYPES: ::Array[grant_type]
|
|
14
|
+
|
|
15
|
+
SUPPORTED_AUTH_METHODS: ::Array[token_auth_method]
|
|
16
|
+
|
|
17
|
+
class OAuthSession
|
|
18
|
+
attr_reader grant_type: grant_type
|
|
19
|
+
|
|
20
|
+
attr_reader client_id: String
|
|
21
|
+
|
|
22
|
+
attr_reader client_secret: String
|
|
23
|
+
|
|
24
|
+
attr_reader access_token: String?
|
|
25
|
+
|
|
26
|
+
attr_reader refresh_token: String?
|
|
27
|
+
|
|
28
|
+
attr_reader scope: Array[String]?
|
|
29
|
+
|
|
30
|
+
attr_reader audience: String?
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
issuer: uri,
|
|
34
|
+
client_id: String,
|
|
35
|
+
client_secret: String,
|
|
36
|
+
?access_token: String?,
|
|
37
|
+
?refresh_token: String?,
|
|
38
|
+
?scope: (Array[String] | String)?,
|
|
39
|
+
?token_endpoint: String?,
|
|
40
|
+
?response_type: String?,
|
|
41
|
+
?grant_type: String?,
|
|
42
|
+
?token_endpoint_auth_method: ::String,
|
|
43
|
+
?audience: ::String
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def token_endpoint: () -> String
|
|
47
|
+
|
|
48
|
+
def token_endpoint_auth_method: () -> token_auth_method
|
|
49
|
+
|
|
50
|
+
def load: (Session http) -> void
|
|
51
|
+
|
|
52
|
+
def merge: (instance | Hash[untyped, untyped] other) -> instance
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
interface _AwsSdkOptions
|
|
56
|
+
def oauth_session: () -> OAuthSession?
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
module InstanceMethods
|
|
60
|
+
def oauth_auth: (**untyped args) -> instance
|
|
61
|
+
|
|
62
|
+
def with_access_token: () -> instance
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
type sessionOAuth = Session & OAuth::InstanceMethods
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Persistent
|
|
4
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
5
|
+
|
|
6
|
+
def self.extra_options: (Options) -> (Options)
|
|
7
|
+
|
|
8
|
+
module InstanceMethods
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
type sessionPersistent = sessionFiberConcurrency & Persistent::InstanceMethods
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Proxy
|
|
4
|
+
module HTTP
|
|
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
|
+
|
|
14
|
+
module ConnectionMethods
|
|
15
|
+
def __http_proxy_connect: (Connection::_Parser parser) -> void
|
|
16
|
+
def __http_on_connect: (top, Response) -> void
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
module ProxyParser
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class ConnectRequest < Request
|
|
23
|
+
def initialize: (generic_uri uri, Options options) -> void
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
type httpProxy = Session & Proxy::HTTP::InstanceMethods
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class Socks4Error < ProxyError
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
module Plugins
|
|
6
|
+
module Proxy
|
|
7
|
+
module Socks4
|
|
8
|
+
|
|
9
|
+
module ConnectionMethods
|
|
10
|
+
def __socks4_proxy_connect: () -> void
|
|
11
|
+
def __socks4_on_packet: (String packet) -> void
|
|
12
|
+
def on_socks4_error: (string) -> void
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class SocksParser
|
|
16
|
+
include HTTPX::Callbacks
|
|
17
|
+
|
|
18
|
+
@buffer: Buffer
|
|
19
|
+
@options: Options
|
|
20
|
+
|
|
21
|
+
def close: () -> void
|
|
22
|
+
def consume: (*untyped) -> void
|
|
23
|
+
def empty: () -> bool
|
|
24
|
+
def <<: (string) -> void
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def initialize: (Buffer buffer, Options options) -> untyped
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
module Packet
|
|
32
|
+
def self?.connect: (Parameters, uri) -> String
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class Socks5Error < ProxyError
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
module Plugins
|
|
6
|
+
module Proxy
|
|
7
|
+
module Socks5
|
|
8
|
+
VERSION: Integer
|
|
9
|
+
NOAUTH: Integer
|
|
10
|
+
PASSWD: Integer
|
|
11
|
+
NONE: Integer
|
|
12
|
+
CONNECT: Integer
|
|
13
|
+
IPV4: Integer
|
|
14
|
+
DOMAIN: Integer
|
|
15
|
+
IPV6: Integer
|
|
16
|
+
SUCCESS: Integer
|
|
17
|
+
|
|
18
|
+
module ConnectionMethods
|
|
19
|
+
def __socks5_proxy_connect: () -> void
|
|
20
|
+
def __socks5_on_packet: (String packet) -> void
|
|
21
|
+
def __socks5_check_version: (int) -> void
|
|
22
|
+
def __on_socks5_error: (string) -> void
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class SocksParser
|
|
26
|
+
include HTTPX::Callbacks
|
|
27
|
+
|
|
28
|
+
@buffer: Buffer
|
|
29
|
+
@options: Options
|
|
30
|
+
|
|
31
|
+
def close: () -> void
|
|
32
|
+
def consume: (*untyped) -> void
|
|
33
|
+
def empty: () -> bool
|
|
34
|
+
def <<: (string) -> void
|
|
35
|
+
|
|
36
|
+
private
|
|
37
|
+
|
|
38
|
+
def initialize: (Buffer buffer, Options options) -> untyped
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
module Packet
|
|
42
|
+
def self?.negotiate: (Parameters parameters) -> String
|
|
43
|
+
def self?.authenticate: (Parameters parameters) -> String
|
|
44
|
+
def self?.connect: (uri uri) -> String
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Proxy
|
|
4
|
+
module SSH
|
|
5
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
6
|
+
|
|
7
|
+
module InstanceMethods
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
def build_gateway_socket: (int, http_uri, Options) -> _ToIO
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
type sessionSSHProxy = Proxy::InstanceMethods & Proxy::SSH::InstanceMethods
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class ProxyError < ConnectionError
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
class ProxySSL < SSL
|
|
6
|
+
attr_reader proxy_io: TCP | SSL
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
module Plugins
|
|
10
|
+
interface _Authenticator
|
|
11
|
+
def authenticate: (Request request, String authenticate) -> String
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
module Proxy
|
|
15
|
+
class ProxyConnectionError < ProxyError
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
PROXY_ERRORS: Array[singleton(StandardError)]
|
|
19
|
+
|
|
20
|
+
class Parameters
|
|
21
|
+
attr_reader uri: URI::Generic?
|
|
22
|
+
attr_reader username: String?
|
|
23
|
+
attr_reader password: String?
|
|
24
|
+
attr_reader scheme: String?
|
|
25
|
+
attr_reader no_proxy: Array[String]?
|
|
26
|
+
|
|
27
|
+
@uris: Array[URI::Generic | String]
|
|
28
|
+
@authenticator: _Authenticator
|
|
29
|
+
|
|
30
|
+
def shift: () -> void
|
|
31
|
+
|
|
32
|
+
def can_authenticate?: (*untyped) -> boolish
|
|
33
|
+
|
|
34
|
+
def authenticate: (*untyped) -> String?
|
|
35
|
+
|
|
36
|
+
def ==: (untyped) -> bool
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def initialize: (?uri: generic_uri | Array[generic_uri], ?scheme: String, ?username: String, ?password: String, ?no_proxy: Array[generic_uri] | generic_uri, **untyped) -> void
|
|
41
|
+
|
|
42
|
+
def infer_default_auth_scheme: (URI::Generic uri) -> String?
|
|
43
|
+
|
|
44
|
+
def load_authenticator: (String scheme, String username, String password, **untyped) -> _Authenticator
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.configure: (singleton(Session)) -> void
|
|
48
|
+
|
|
49
|
+
interface _ProxyOptions
|
|
50
|
+
def proxy: () -> Parameters?
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.extra_options: (Options) -> (Options & _ProxyOptions)
|
|
54
|
+
|
|
55
|
+
module ConnectionMethods
|
|
56
|
+
@proxy_uri: generic_uri
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
module InstanceMethods
|
|
60
|
+
@__proxy_uris: Array[generic_uri]
|
|
61
|
+
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
def proxy_error?: (Request request, response, Options options) -> bool
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
type sessionProxy = Session & Proxy::InstanceMethods
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module PushPromise
|
|
4
|
+
module ResponseMethods
|
|
5
|
+
@__pushed: bool?
|
|
6
|
+
|
|
7
|
+
def pushed?: () -> boolish
|
|
8
|
+
def mark_as_pushed!: () -> void
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
module InstanceMethods
|
|
12
|
+
@promise_headers: Hash[::HTTP2::Stream, Request]?
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def promise_headers: () -> Hash[::HTTP2::Stream, Request]
|
|
16
|
+
def __on_promise_request: (Connection::HTTP2, ::HTTP2::Stream, headers_input) -> void
|
|
17
|
+
def __on_promise_response: (Connection::HTTP2, ::HTTP2::Stream, headers_input) -> void
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
type sessionPushPromise = Session & PushPromise::InstanceMethods
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Query
|
|
4
|
+
def self.subplugins: () -> Hash[Symbol, Module]
|
|
5
|
+
|
|
6
|
+
module InstanceMethods
|
|
7
|
+
def query: (uri | [uri], **untyped) -> response
|
|
8
|
+
| (_Each[uri | [uri, request_params]], **untyped) -> Array[response]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
module QueryRetries
|
|
12
|
+
module InstanceMethods
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
type sessionQuery = Session & Query::InstanceMethods
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module RateLimiter
|
|
4
|
+
RATE_LIMIT_CODES: Array[Integer]
|
|
5
|
+
|
|
6
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
7
|
+
|
|
8
|
+
def self.retry_on_rate_limited_response: (_Response) -> bool
|
|
9
|
+
|
|
10
|
+
def self.retry_after_rate_limit: (untyped, response) -> Numeric?
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module ResponseCache
|
|
4
|
+
class FileStore
|
|
5
|
+
@dir: Pathname
|
|
6
|
+
|
|
7
|
+
include _ResponseCacheStore
|
|
8
|
+
|
|
9
|
+
def initialize: (?path dir) -> void
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def file_path: (cacheRequest request) -> Pathname
|
|
14
|
+
|
|
15
|
+
def read_from_file: (cacheRequest request, File f) -> cacheResponse?
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module ResponseCache
|
|
4
|
+
CACHEABLE_VERBS: Array[verb]
|
|
5
|
+
CACHEABLE_STATUS_CODES: Array[Integer]
|
|
6
|
+
SUPPORTED_VARY_HEADERS: Array[String]
|
|
7
|
+
|
|
8
|
+
def self?.cacheable_response?: (::HTTPX::ErrorResponse | cacheResponse response) -> bool
|
|
9
|
+
|
|
10
|
+
def self?.not_modified?: (response response) -> bool
|
|
11
|
+
|
|
12
|
+
interface _ResponseCacheOptions
|
|
13
|
+
def response_cache_store: () -> Store
|
|
14
|
+
|
|
15
|
+
def supported_vary_headers: () -> Array[String]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
interface _ResponseCacheStore
|
|
19
|
+
def get: (cacheRequest request) -> cacheResponse?
|
|
20
|
+
|
|
21
|
+
def set: (cacheRequest request, cacheResponse response) -> void
|
|
22
|
+
|
|
23
|
+
def clear: () -> void
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
module InstanceMethods
|
|
27
|
+
@response_cache: Store
|
|
28
|
+
|
|
29
|
+
def clear_response_cache: () -> void
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def prepare_cache: (cacheRequest request) -> void
|
|
34
|
+
|
|
35
|
+
def cacheable_request?: (cacheRequest request) -> bool
|
|
36
|
+
|
|
37
|
+
def match_by_vary?: (cacheRequest request, cacheResponse response) -> bool
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
module RequestMethods
|
|
41
|
+
attr_accessor cached_response: cacheResponse?
|
|
42
|
+
|
|
43
|
+
@response_cache_key: String
|
|
44
|
+
|
|
45
|
+
def response_cache_key: () -> String
|
|
46
|
+
|
|
47
|
+
def cacheable_verb?: () -> bool
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
module ResponseMethods
|
|
51
|
+
attr_writer original_request: cacheRequest
|
|
52
|
+
|
|
53
|
+
@cache: bool
|
|
54
|
+
|
|
55
|
+
def original_request: () -> cacheRequest?
|
|
56
|
+
|
|
57
|
+
def cached?: () -> bool
|
|
58
|
+
|
|
59
|
+
def mark_as_cached!: () -> void
|
|
60
|
+
|
|
61
|
+
def copy_from_cached!: () -> void
|
|
62
|
+
|
|
63
|
+
def fresh?: () -> bool
|
|
64
|
+
|
|
65
|
+
def cache_control: () -> Array[String]?
|
|
66
|
+
|
|
67
|
+
def vary: () -> Array[String]?
|
|
68
|
+
|
|
69
|
+
private
|
|
70
|
+
|
|
71
|
+
def age: () -> Integer
|
|
72
|
+
|
|
73
|
+
def date: () -> Time
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
type cacheOptions = Options & _ResponseCacheOptions
|
|
78
|
+
|
|
79
|
+
type cacheRequest = Request & RequestMethods
|
|
80
|
+
|
|
81
|
+
type cacheResponse = Response & ResponseMethods
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
type sessionResponseCache = Session & ResponseCache::InstanceMethods
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Retries
|
|
4
|
+
MAX_RETRIES: Integer
|
|
5
|
+
IDEMPOTENT_METHODS: Array[String]
|
|
6
|
+
RECONNECTABLE_ERRORS: Array[singleton(StandardError)]
|
|
7
|
+
RETRYABLE_ERRORS: Array[singleton(StandardError)]
|
|
8
|
+
DEFAULT_JITTER: ^(Numeric) -> Numeric
|
|
9
|
+
|
|
10
|
+
interface _RetryCallback
|
|
11
|
+
def call: (response response) -> bool?
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
interface _RetriesOptions
|
|
15
|
+
def retry_after: () -> Numeric?
|
|
16
|
+
|
|
17
|
+
def retry_jitter: () -> ^(Numeric jitter) -> Numeric
|
|
18
|
+
|
|
19
|
+
def max_retries: () -> Integer
|
|
20
|
+
|
|
21
|
+
def retry_change_requests: () -> boolish
|
|
22
|
+
|
|
23
|
+
def retry_on: () -> _RetryCallback?
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.extra_options: (Options options) -> retriesOptions
|
|
27
|
+
|
|
28
|
+
module InstanceMethods
|
|
29
|
+
def max_retries: (int) -> instance
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def fetch_response: (retriesRequest request, Selector selector, retriesOptions options) -> (retriesResponse | ErrorResponse)?
|
|
34
|
+
|
|
35
|
+
def repeatable_request?: (retriesRequest request, retriesOptions options) -> boolish
|
|
36
|
+
|
|
37
|
+
def retryable_error?: (_Exception error) -> bool
|
|
38
|
+
|
|
39
|
+
def try_partial_retry: (retriesRequest request, (retriesResponse | ErrorResponse) response) -> void
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
module RequestMethods
|
|
44
|
+
@options: Options & _RetriesOptions
|
|
45
|
+
|
|
46
|
+
attr_accessor retries: Integer
|
|
47
|
+
|
|
48
|
+
attr_writer partial_response: Response?
|
|
49
|
+
|
|
50
|
+
def response=: (retriesResponse | ErrorResponse response) -> void
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
module ResponseMethods
|
|
54
|
+
def from_partial_response: (Response response) -> void
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
type retriesOptions = Options & _RetriesOptions
|
|
58
|
+
|
|
59
|
+
type retriesRequest = Request & RequestMethods
|
|
60
|
+
|
|
61
|
+
type retriesResponse = Response & ResponseMethods
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type sessionRetries = Session & Retries::InstanceMethods
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class ServerSideRequestForgeryError < Error
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
module Plugins
|
|
6
|
+
module SsrfFilter
|
|
7
|
+
IPV4_BLACKLIST: Array[IPAddr]
|
|
8
|
+
|
|
9
|
+
IPV6_BLACKLIST: Array[[IPAddr, IPAddr]]
|
|
10
|
+
|
|
11
|
+
def self?.unsafe_ip_address?: (Resolver::Entry ipaddr) -> bool
|
|
12
|
+
|
|
13
|
+
interface _Options
|
|
14
|
+
def allowed_schemes: () -> Array[String]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
module InstanceMethods
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
module ConnectionMethods
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
type sessionSsrf = Session & SsrfFilter::InstanceMethods
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Stream
|
|
4
|
+
module InstanceMethods
|
|
5
|
+
private
|
|
6
|
+
|
|
7
|
+
def request: (*Request, ?stream: bool, **untyped?) -> (response | Array[response] | StreamResponse)
|
|
8
|
+
| (*untyped, ?stream: bool, **untyped?) -> (response | Array[response] | StreamResponse)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
module RequestMethods
|
|
12
|
+
attr_accessor stream: StreamResponse?
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
module ResponseMethods
|
|
16
|
+
def stream: () -> StreamResponse?
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
module ResponseBodyMethods
|
|
20
|
+
@stream: StreamResponse?
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
type sessionStream = Session & Stream::InstanceMethods
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class StreamResponse
|
|
28
|
+
include _ToS
|
|
29
|
+
|
|
30
|
+
type streamRequest = Request & Plugins::Stream::RequestMethods
|
|
31
|
+
|
|
32
|
+
attr_reader request: streamRequest
|
|
33
|
+
@options: Options
|
|
34
|
+
|
|
35
|
+
@session: Plugins::sessionStream
|
|
36
|
+
@response_enum: Enumerator[String]?
|
|
37
|
+
@buffered_chunks: Array[String]
|
|
38
|
+
@on_chunk: ^(String) -> void | nil
|
|
39
|
+
|
|
40
|
+
def each: () { (String) -> void } -> void
|
|
41
|
+
| () -> Enumerable[String]
|
|
42
|
+
|
|
43
|
+
def each_line: () { (String) -> void } -> void
|
|
44
|
+
| () -> Enumerable[String]
|
|
45
|
+
|
|
46
|
+
def on_chunk: (string) -> void
|
|
47
|
+
|
|
48
|
+
def initialize: (streamRequest, Plugins::sessionStream) -> void
|
|
49
|
+
|
|
50
|
+
private
|
|
51
|
+
|
|
52
|
+
def response: () -> response
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module StreamBidi
|
|
4
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
5
|
+
|
|
6
|
+
def self.extra_options: (Options) -> (Options)
|
|
7
|
+
|
|
8
|
+
class HTTP2Bidi < Connection::HTTP2
|
|
9
|
+
@lock: Thread::Mutex
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def handle_stream: (::HTTP2::Stream stream, Request & RequestMethods request) -> void
|
|
14
|
+
|
|
15
|
+
def end_stream?: (Request & RequestMethods request, String? next_chunk) -> void
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class BidiBuffer < Buffer
|
|
19
|
+
@parent_thread: Thread
|
|
20
|
+
@oob_mutex: Thread::Mutex
|
|
21
|
+
@oob_buffer: String
|
|
22
|
+
|
|
23
|
+
def rebuffer: () -> void
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
class Signal
|
|
27
|
+
@closed: bool
|
|
28
|
+
@pipe_read: IO
|
|
29
|
+
@pipe_write: IO
|
|
30
|
+
|
|
31
|
+
include _Selectable
|
|
32
|
+
|
|
33
|
+
def wakeup: () -> void
|
|
34
|
+
|
|
35
|
+
def mergeable?: () -> bool
|
|
36
|
+
|
|
37
|
+
def terminate: () -> void
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
module InstanceMethods
|
|
41
|
+
@signal: Signal
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
module RequestMethods
|
|
45
|
+
attr_accessor headers_sent: bool
|
|
46
|
+
|
|
47
|
+
@closed: bool
|
|
48
|
+
@mutex: Thread::Mutex
|
|
49
|
+
|
|
50
|
+
def closed?: () -> bool
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
module RequestBodyMethods
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
module ConnectionMethods
|
|
57
|
+
@write_buffer: BidiBuffer
|
|
58
|
+
|
|
59
|
+
private
|
|
60
|
+
|
|
61
|
+
def parser_type: (String protocol) -> (singleton(Connection::HTTP1) | singleton(Connection::HTTP2) | singleton(HTTP2Bidi))
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
type sessionStreamBidi = Session & StreamBidi::InstanceMethods
|
|
67
|
+
end
|
|
68
|
+
end
|