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
data/sig/io/udp.rbs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class UDP
|
|
3
|
+
include Loggable
|
|
4
|
+
|
|
5
|
+
@host: String
|
|
6
|
+
@port: Integer
|
|
7
|
+
@io: UDPSocket
|
|
8
|
+
@options: Options
|
|
9
|
+
|
|
10
|
+
def initialize: (String ip, Integer port, Options options) -> void
|
|
11
|
+
|
|
12
|
+
def to_io: () -> IO
|
|
13
|
+
|
|
14
|
+
def connect: () -> void
|
|
15
|
+
|
|
16
|
+
def connected?: () -> bool
|
|
17
|
+
|
|
18
|
+
# :nocov:
|
|
19
|
+
def close: () -> void
|
|
20
|
+
|
|
21
|
+
def read: (Integer size, String buffer) -> Integer?
|
|
22
|
+
|
|
23
|
+
def write: (Buffer buffer) -> Integer?
|
|
24
|
+
end
|
|
25
|
+
end
|
data/sig/io/unix.rbs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class UNIX < TCP
|
|
3
|
+
|
|
4
|
+
attr_reader path: String
|
|
5
|
+
|
|
6
|
+
alias host path
|
|
7
|
+
|
|
8
|
+
@hostname: String
|
|
9
|
+
|
|
10
|
+
@options: Options
|
|
11
|
+
|
|
12
|
+
@fallback_protocol: String
|
|
13
|
+
|
|
14
|
+
@keep_open: bool
|
|
15
|
+
|
|
16
|
+
@io: Socket
|
|
17
|
+
|
|
18
|
+
def initialize: (http_uri origin, String? path, Options options) -> void
|
|
19
|
+
|
|
20
|
+
def connect: () -> void
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def build_socket: () -> Socket
|
|
25
|
+
end
|
|
26
|
+
end
|
data/sig/io.rbs
ADDED
data/sig/loggable.rbs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
interface _IOLogger
|
|
3
|
+
def <<: (string?) -> void
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
module Loggable
|
|
7
|
+
USE_DEBUG_LOGS: bool
|
|
8
|
+
|
|
9
|
+
COLORS: Hash[Symbol, Integer]
|
|
10
|
+
|
|
11
|
+
def log: (?level: Integer?, ?color: Symbol?, ?debug_level: Integer, ?debug: _IOLogger?) { () -> String } -> void
|
|
12
|
+
|
|
13
|
+
def log_exception: (Exception error, ?level: Integer, ?color: Symbol, ?debug_level: Integer, ?debug: _IOLogger?) -> void
|
|
14
|
+
|
|
15
|
+
def log_redact: (_ToS text, ?bool should_redact) -> String
|
|
16
|
+
end
|
|
17
|
+
end
|
data/sig/options.rbs
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
class Options
|
|
3
|
+
# include _ToHash
|
|
4
|
+
|
|
5
|
+
BUFFER_SIZE: Integer
|
|
6
|
+
WINDOW_SIZE: Integer
|
|
7
|
+
MAX_BODY_THRESHOLD_SIZE: Integer
|
|
8
|
+
CONNECT_TIMEOUT: Integer
|
|
9
|
+
READ_TIMEOUT: Integer
|
|
10
|
+
WRITE_TIMEOUT: Integer
|
|
11
|
+
REQUEST_TIMEOUT: Integer
|
|
12
|
+
OPERATION_TIMEOUT: Integer
|
|
13
|
+
KEEP_ALIVE_TIMEOUT: Integer
|
|
14
|
+
SETTINGS_TIMEOUT: Integer
|
|
15
|
+
CLOSE_HANDSHAKE_TIMEOUT: Integer
|
|
16
|
+
SET_TEMPORARY_NAME: ^(Class klass, ?Symbol pl) -> void
|
|
17
|
+
|
|
18
|
+
DEFAULT_OPTIONS: Hash[Symbol, untyped]
|
|
19
|
+
REQUEST_BODY_IVARS: Array[Symbol]
|
|
20
|
+
|
|
21
|
+
type timeout_type = :connect_timeout | :settings_timeout | :close_handshake_timeout | :operation_timeout | :keep_alive_timeout | :read_timeout | :write_timeout | :request_timeout
|
|
22
|
+
type timeout = Hash[timeout_type, Numeric?]
|
|
23
|
+
|
|
24
|
+
def self.new: (?options) -> instance
|
|
25
|
+
|
|
26
|
+
attr_reader self.options_names: Array[Symbol]
|
|
27
|
+
|
|
28
|
+
# headers
|
|
29
|
+
attr_reader uri: URI?
|
|
30
|
+
|
|
31
|
+
# headers
|
|
32
|
+
attr_reader headers: headers?
|
|
33
|
+
|
|
34
|
+
# timeout
|
|
35
|
+
attr_reader timeout: timeout
|
|
36
|
+
|
|
37
|
+
# http2_settings
|
|
38
|
+
attr_reader http2_settings: Hash[Symbol, Integer | bool]
|
|
39
|
+
|
|
40
|
+
# max_concurrent_requests
|
|
41
|
+
attr_reader max_concurrent_requests: Integer?
|
|
42
|
+
|
|
43
|
+
# max_requests
|
|
44
|
+
attr_reader max_requests: Numeric?
|
|
45
|
+
|
|
46
|
+
# window_size
|
|
47
|
+
attr_reader window_size: Integer
|
|
48
|
+
|
|
49
|
+
# buffer_size
|
|
50
|
+
attr_reader buffer_size: Integer
|
|
51
|
+
|
|
52
|
+
# body_threshold_size
|
|
53
|
+
attr_reader body_threshold_size: Integer
|
|
54
|
+
|
|
55
|
+
# transport
|
|
56
|
+
attr_reader transport: io_type | nil
|
|
57
|
+
|
|
58
|
+
# addresses
|
|
59
|
+
attr_reader addresses: Array[Resolver::Entry]?
|
|
60
|
+
|
|
61
|
+
# supported_compression_formats
|
|
62
|
+
attr_reader supported_compression_formats: Array[String]
|
|
63
|
+
|
|
64
|
+
# compress_request_body
|
|
65
|
+
attr_reader compress_request_body: bool
|
|
66
|
+
|
|
67
|
+
# decompress_response_body
|
|
68
|
+
attr_reader decompress_response_body: bool
|
|
69
|
+
|
|
70
|
+
# origin
|
|
71
|
+
attr_reader origin: URI::Generic?
|
|
72
|
+
|
|
73
|
+
# base_path
|
|
74
|
+
attr_reader base_path: String?
|
|
75
|
+
|
|
76
|
+
# classes
|
|
77
|
+
attr_reader resolver_native_class: singleton(Resolver::Native)
|
|
78
|
+
|
|
79
|
+
attr_reader resolver_system_class: singleton(Resolver::System)
|
|
80
|
+
|
|
81
|
+
attr_reader resolver_https_class: singleton(Resolver::HTTPS)
|
|
82
|
+
|
|
83
|
+
attr_reader http1_class: singleton(Connection::HTTP1)
|
|
84
|
+
|
|
85
|
+
attr_reader http2_class: singleton(Connection::HTTP2)
|
|
86
|
+
|
|
87
|
+
attr_reader connection_class: singleton(Connection)
|
|
88
|
+
|
|
89
|
+
attr_reader pool_class: singleton(Pool)
|
|
90
|
+
|
|
91
|
+
attr_reader request_class: singleton(Request)
|
|
92
|
+
|
|
93
|
+
attr_reader response_class: singleton(Response)
|
|
94
|
+
|
|
95
|
+
attr_reader headers_class: singleton(Headers)
|
|
96
|
+
|
|
97
|
+
attr_reader request_body_class: singleton(Request::Body)
|
|
98
|
+
|
|
99
|
+
attr_reader response_body_class: singleton(Response::Body)
|
|
100
|
+
|
|
101
|
+
attr_reader options_class: singleton(Options)
|
|
102
|
+
|
|
103
|
+
attr_reader resolver_class: Symbol | singleton(Resolver::Resolver)
|
|
104
|
+
|
|
105
|
+
attr_reader ssl: Hash[Symbol, untyped]
|
|
106
|
+
|
|
107
|
+
# io
|
|
108
|
+
type io_option = _ToIO | Hash[String, _ToIO]
|
|
109
|
+
attr_reader io: io_option?
|
|
110
|
+
|
|
111
|
+
# fallback_protocol
|
|
112
|
+
attr_reader fallback_protocol: String
|
|
113
|
+
|
|
114
|
+
# debug
|
|
115
|
+
attr_reader debug: _IOLogger?
|
|
116
|
+
|
|
117
|
+
# debug_level
|
|
118
|
+
attr_reader debug_level: Integer
|
|
119
|
+
|
|
120
|
+
# persistent
|
|
121
|
+
attr_reader persistent: bool
|
|
122
|
+
|
|
123
|
+
# close_on_fork
|
|
124
|
+
attr_reader close_on_fork: bool
|
|
125
|
+
|
|
126
|
+
# resolver_options
|
|
127
|
+
attr_reader resolver_options: Hash[Symbol, untyped]
|
|
128
|
+
|
|
129
|
+
# resolver_options
|
|
130
|
+
attr_reader pool_options: pool_options
|
|
131
|
+
|
|
132
|
+
# ip_families
|
|
133
|
+
attr_reader ip_families: Array[ip_family]?
|
|
134
|
+
|
|
135
|
+
def ==: (Options other) -> bool
|
|
136
|
+
|
|
137
|
+
def options_equals?: (Options other, ?Array[Symbol] ignore_ivars) -> bool
|
|
138
|
+
|
|
139
|
+
def merge: (_ToHash[Symbol, untyped] other) -> instance
|
|
140
|
+
|
|
141
|
+
def to_hash: () -> Hash[Symbol, untyped]
|
|
142
|
+
|
|
143
|
+
def extend_with_plugin_classes: (Module pl) -> void
|
|
144
|
+
|
|
145
|
+
private
|
|
146
|
+
|
|
147
|
+
def initialize: (?options options) -> void
|
|
148
|
+
|
|
149
|
+
def access_option: (Hash[Symbol, untyped] | Object | nil obj, Symbol k, Hash[Symbol, Symbol]? ivar_map) -> untyped
|
|
150
|
+
|
|
151
|
+
# integer
|
|
152
|
+
def option_max_concurrent_requests: (Numeric value) -> Numeric
|
|
153
|
+
def option_max_requests: (Numeric value) -> Numeric
|
|
154
|
+
def option_window_size: (Numeric value) -> Numeric
|
|
155
|
+
def option_buffer_size: (Numeric value) -> Numeric
|
|
156
|
+
def option_body_threshold_size: (Numeric value) -> Numeric
|
|
157
|
+
def option_debug_level: (Numeric value) -> Numeric
|
|
158
|
+
|
|
159
|
+
# to hash
|
|
160
|
+
def option_ssl: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
|
|
161
|
+
def option_http2_settings: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
|
|
162
|
+
def option_resolver_options: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
|
|
163
|
+
def option_pool_options: (_ToHash[Symbol, untyped] value) -> Hash[Symbol, untyped]
|
|
164
|
+
|
|
165
|
+
# no transform
|
|
166
|
+
def option_request_class: (singleton(Request) value) -> singleton(Request)
|
|
167
|
+
def option_response_class: (singleton(Response) value) -> singleton(Response)
|
|
168
|
+
def option_headers_class: (singleton(Headers) value) -> singleton(Headers)
|
|
169
|
+
def option_request_body_class: (singleton(Request::Body) value) -> singleton(Request::Body)
|
|
170
|
+
def option_response_body_class: (singleton(Response::Body) value) -> singleton(Response::Body)
|
|
171
|
+
def option_connection_class: (singleton(Connection) value) -> singleton(Connection)
|
|
172
|
+
def option_options_class: (singleton(Options) value) -> singleton(Options)
|
|
173
|
+
def option_pool_class: (singleton(Pool) value) -> singleton(Pool)
|
|
174
|
+
def option_resolver_class: (Symbol | singleton(Resolver::Resolver) value) -> (Symbol | singleton(Resolver::Resolver))
|
|
175
|
+
def option_io: (io_option value) -> io_option
|
|
176
|
+
def option_fallback_protocol: (String value) -> String
|
|
177
|
+
def option_debug: (_IOLogger value) -> _IOLogger
|
|
178
|
+
def option_debug_redact: (bool value) -> bool
|
|
179
|
+
def option_compress_request_body: (bool value) -> bool
|
|
180
|
+
def option_decompress_response_body: (bool value) -> bool
|
|
181
|
+
def option_persistent: (bool value) -> bool
|
|
182
|
+
def option_close_on_fork: (bool value) -> bool
|
|
183
|
+
|
|
184
|
+
def option_origin: (http_uri | String value) -> http_uri
|
|
185
|
+
|
|
186
|
+
def option_base_path: (_ToStr value) -> String
|
|
187
|
+
|
|
188
|
+
def option_headers: (headers_input | Headers value) -> Headers
|
|
189
|
+
|
|
190
|
+
def option_timeout: (_ToHash[timeout_type, Numeric?]) -> timeout
|
|
191
|
+
|
|
192
|
+
def option_supported_compression_formats: (_ToS | _ToAry[_ToS] value) -> Array[String]
|
|
193
|
+
|
|
194
|
+
def option_transport: (_ToS value) -> String
|
|
195
|
+
|
|
196
|
+
def option_addresses: (ipaddr | _ToAry[ipaddr] value) -> Array[ipaddr]
|
|
197
|
+
|
|
198
|
+
def option_ip_families: (ip_family | _ToAry[ip_family] value) -> Array[ip_family]
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
type options = Options | Hash[Symbol, untyped]
|
|
202
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Parser
|
|
3
|
+
class Error < HTTPX::Error
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
type parsed_headers = Hash[String, Array[String]]
|
|
7
|
+
|
|
8
|
+
interface _HTTP1Events
|
|
9
|
+
|
|
10
|
+
def on_start: () -> void
|
|
11
|
+
def on_headers: (parsed_headers headers) -> void
|
|
12
|
+
def on_trailers: (parsed_headers trailers) -> void
|
|
13
|
+
def on_data: (String data) -> void
|
|
14
|
+
def on_complete: () -> void
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class HTTP1
|
|
18
|
+
VERSIONS: Array[String]
|
|
19
|
+
|
|
20
|
+
attr_reader status_code: Integer
|
|
21
|
+
attr_reader http_version: [Integer, Integer]
|
|
22
|
+
attr_reader headers: parsed_headers
|
|
23
|
+
|
|
24
|
+
@observer: _HTTP1Events
|
|
25
|
+
@state: Symbol
|
|
26
|
+
@buffer: String
|
|
27
|
+
@content_type: String?
|
|
28
|
+
@content_length: Integer
|
|
29
|
+
@_has_trailers: bool
|
|
30
|
+
@upgrade: bool
|
|
31
|
+
|
|
32
|
+
def <<: (string chunk) -> void
|
|
33
|
+
|
|
34
|
+
def reset!: () -> void
|
|
35
|
+
|
|
36
|
+
def upgrade?: () -> bool
|
|
37
|
+
|
|
38
|
+
def upgrade_data: () -> String
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
def initialize: (_HTTP1Events observer) -> untyped
|
|
43
|
+
|
|
44
|
+
def nextstate: (Symbol state) -> void
|
|
45
|
+
|
|
46
|
+
def no_more_data?: () -> bool
|
|
47
|
+
|
|
48
|
+
def parse: () -> void
|
|
49
|
+
|
|
50
|
+
def parse_data: () -> void
|
|
51
|
+
|
|
52
|
+
def parse_headers: () -> void
|
|
53
|
+
|
|
54
|
+
def parse_headline: () -> void
|
|
55
|
+
|
|
56
|
+
def prepare_data: (parsed_headers headers) -> void
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Authentication
|
|
4
|
+
class Basic
|
|
5
|
+
@user: String
|
|
6
|
+
@password: String
|
|
7
|
+
|
|
8
|
+
def authenticate: (*untyped) -> String
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def initialize: (string user, string password, *untyped) -> void
|
|
13
|
+
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Authentication
|
|
4
|
+
class Digest
|
|
5
|
+
@user: String
|
|
6
|
+
@password: String
|
|
7
|
+
@hashed: bool
|
|
8
|
+
|
|
9
|
+
def can_authenticate?: (String? authenticate) -> boolish
|
|
10
|
+
|
|
11
|
+
def authenticate: (Request request, String authenticate) -> String
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def generate_header: (String meth, String uri, String authenticate) -> String
|
|
16
|
+
|
|
17
|
+
def initialize: (string user, string password, ?hashed: bool, **untyped) -> void
|
|
18
|
+
|
|
19
|
+
def make_cnonce: () -> String
|
|
20
|
+
|
|
21
|
+
def next_nonce: () -> Integer
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
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
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Authorization
|
|
4
|
+
module InstanceMethods
|
|
5
|
+
def authorization: (string token) -> instance
|
|
6
|
+
|
|
7
|
+
def bearer_auth: (string token) -> instance
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
type sessionAuthorization = Session & Authorization::InstanceMethods
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module AwsSdkAuthentication
|
|
4
|
+
class Configuration
|
|
5
|
+
attr_reader profile: String?
|
|
6
|
+
|
|
7
|
+
private
|
|
8
|
+
|
|
9
|
+
def initialize: (String? profile) -> void
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class Credentials
|
|
13
|
+
@aws_credentials: untyped
|
|
14
|
+
|
|
15
|
+
include _SigV4Credentials
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def initialize: (untyped aws_credentials) -> untyped
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
interface _AwsSdkOptions
|
|
23
|
+
def aws_profile: () -> String?
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
27
|
+
|
|
28
|
+
def self.configure: (singleton(Session)) -> void
|
|
29
|
+
|
|
30
|
+
def self.extra_options: (Options) -> (Options & _AwsSdkOptions)
|
|
31
|
+
|
|
32
|
+
def self.credentials: (String? profile) -> Credentials
|
|
33
|
+
|
|
34
|
+
def self.region: (String? profile) -> String
|
|
35
|
+
|
|
36
|
+
module InstanceMethods
|
|
37
|
+
def aws_sdk_authentication: (?credentials: Credentials, ?region: String, **untyped) -> instance
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
type sessionAwsSdkAuthentication = awsSigV4Session & AwsSdkAuthentication::InstanceMethods
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
|
|
4
|
+
interface _SigV4Credentials
|
|
5
|
+
def username: () -> String
|
|
6
|
+
def password: () -> String
|
|
7
|
+
def security_token: () -> String?
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
module AWSSigV4
|
|
11
|
+
|
|
12
|
+
class Credentials < Struct[[String, String, String?]]
|
|
13
|
+
attr_reader username: String
|
|
14
|
+
attr_reader password: String
|
|
15
|
+
attr_reader security_token: String?
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Signer
|
|
20
|
+
@credentials: Object & _SigV4Credentials
|
|
21
|
+
@service: String
|
|
22
|
+
@region: String
|
|
23
|
+
@unsigned_headers: Set[String]
|
|
24
|
+
@apply_checksum_header: bool
|
|
25
|
+
@provider_prefix: String
|
|
26
|
+
@header_provider_field: String
|
|
27
|
+
@algorithm: String
|
|
28
|
+
|
|
29
|
+
def sign!: (Request & RequestMethods request) -> void
|
|
30
|
+
|
|
31
|
+
def self.new: (instance) -> instance
|
|
32
|
+
| (**untyped params) -> instance
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
service: String,
|
|
37
|
+
region: String,
|
|
38
|
+
?credentials: _SigV4Credentials,
|
|
39
|
+
?username: String,
|
|
40
|
+
?password: String,
|
|
41
|
+
?security_token: String,
|
|
42
|
+
?provider_prefix: String,
|
|
43
|
+
?header_provider_field: String,
|
|
44
|
+
?unsigned_headers: Array[String],
|
|
45
|
+
?apply_checksum_header: bool,
|
|
46
|
+
?algorithm: String
|
|
47
|
+
) -> untyped
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def hexdigest: (Request::Body value) -> String
|
|
51
|
+
|
|
52
|
+
def hmac: (String key, String value) -> String
|
|
53
|
+
|
|
54
|
+
def hexhmac: (String key, String value) -> String
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
interface _SigV4Options
|
|
59
|
+
def sigv4_signer: () -> Signer?
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.extra_options: (Options) -> (Options & _SigV4Options)
|
|
63
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
64
|
+
|
|
65
|
+
module InstanceMethods
|
|
66
|
+
def aws_sigv4_authentication: (**untyped) -> instance
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
module RequestMethods
|
|
70
|
+
def canonical_path: () -> String
|
|
71
|
+
|
|
72
|
+
def canonical_query: () -> String
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
type awsSigV4Session = Session & AWSSigV4::InstanceMethods
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module BasicAuth
|
|
4
|
+
def self.load_dependencies: (singleton(Session)) -> void
|
|
5
|
+
|
|
6
|
+
def self.configure: (singleton(Session)) -> void
|
|
7
|
+
|
|
8
|
+
module InstanceMethods
|
|
9
|
+
def basic_auth: (string user, string password) -> instance
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
type sessionBasicAuth = sessionAuthorization & BasicAuth::InstanceMethods
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Brotli
|
|
4
|
+
def self?.load_dependencies: (singleton(Session)) -> void
|
|
5
|
+
|
|
6
|
+
def self?.encode: (body_encoder body) -> Deflater
|
|
7
|
+
|
|
8
|
+
def self?.decode: (HTTPX::Response response, ?bytesize: Integer) -> Transcoder::_Decoder
|
|
9
|
+
|
|
10
|
+
class Deflater < Transcoder::Deflater
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
module RequestBodyClassMethods
|
|
14
|
+
def initialize_deflater_body: (body_encoder body, Encoding | String encoding) -> body_encoder
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
module ResponseBodyClassMethods
|
|
18
|
+
def initialize_inflater_by_encoding: (Encoding | String encoding, Response response, ?bytesize: Integer) -> (Transcoder::_Decoder | Transcoder::GZIP::Inflater)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module HTTPX
|
|
2
|
+
module Plugins
|
|
3
|
+
module Callbacks
|
|
4
|
+
class CallbackError < Exception
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
module InstanceMethods
|
|
8
|
+
include HTTPX::Callbacks
|
|
9
|
+
|
|
10
|
+
type socket = TCPSocket | OpenSSL::SSL::SSLSocket | UNIXSocket
|
|
11
|
+
|
|
12
|
+
def on_connection_opened: () { (http_uri origin, socket sock) -> void } -> self
|
|
13
|
+
|
|
14
|
+
def on_connection_closed: () { (http_uri origin) -> void } -> self
|
|
15
|
+
|
|
16
|
+
def on_request_error: () { (Request request, StandardError error) -> void } -> self
|
|
17
|
+
|
|
18
|
+
def on_request_started: () { (Request request) -> void } -> self
|
|
19
|
+
|
|
20
|
+
def on_request_body_chunk: () { (Request request, String chunk) -> void } -> self
|
|
21
|
+
|
|
22
|
+
def on_request_completed: () { (Request request) -> void } -> self
|
|
23
|
+
|
|
24
|
+
def on_response_started: () { (Request request, Response response) -> void } -> self
|
|
25
|
+
|
|
26
|
+
def on_response_body_chunk: () { (Request request, Response response, String chunk) -> void } -> self
|
|
27
|
+
|
|
28
|
+
def on_response_completed: () { (Request request, response response) -> void } -> self
|
|
29
|
+
|
|
30
|
+
private
|
|
31
|
+
|
|
32
|
+
def emit_or_callback_error: (*untyped) -> void
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
type sessionCallbacks = Session & Callbacks::InstanceMethods
|
|
37
|
+
end
|
|
38
|
+
end
|