httpx 0.15.3 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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/lib/httpx/adapters/faraday.rb +3 -11
- data/lib/httpx/adapters/webmock.rb +2 -2
- data/lib/httpx/buffer.rb +1 -1
- data/lib/httpx/callbacks.rb +1 -1
- data/lib/httpx/chainable.rb +15 -8
- data/lib/httpx/connection/http1.rb +18 -10
- data/lib/httpx/connection/http2.rb +14 -21
- data/lib/httpx/connection.rb +6 -7
- data/lib/httpx/errors.rb +11 -11
- data/lib/httpx/headers.rb +1 -1
- data/lib/httpx/io/ssl.rb +2 -2
- data/lib/httpx/io/tls.rb +1 -1
- data/lib/httpx/options.rb +108 -81
- data/lib/httpx/parser/http1.rb +11 -7
- data/lib/httpx/plugins/aws_sigv4.rb +10 -9
- data/lib/httpx/plugins/compression.rb +12 -11
- data/lib/httpx/plugins/cookies/cookie.rb +4 -2
- data/lib/httpx/plugins/cookies/jar.rb +20 -1
- data/lib/httpx/plugins/cookies.rb +20 -7
- data/lib/httpx/plugins/digest_authentication.rb +19 -15
- data/lib/httpx/plugins/expect.rb +19 -15
- data/lib/httpx/plugins/follow_redirects.rb +9 -9
- data/lib/httpx/plugins/grpc/call.rb +4 -1
- data/lib/httpx/plugins/grpc.rb +73 -47
- data/lib/httpx/plugins/h2c.rb +7 -3
- data/lib/httpx/plugins/multipart/decoder.rb +187 -0
- data/lib/httpx/plugins/multipart/mime_type_detector.rb +3 -3
- data/lib/httpx/plugins/multipart/part.rb +2 -2
- data/lib/httpx/plugins/multipart.rb +14 -0
- data/lib/httpx/plugins/ntlm_authentication.rb +12 -10
- data/lib/httpx/plugins/proxy/socks4.rb +2 -1
- data/lib/httpx/plugins/proxy/socks5.rb +2 -1
- data/lib/httpx/plugins/proxy/ssh.rb +20 -13
- data/lib/httpx/plugins/proxy.rb +10 -10
- data/lib/httpx/plugins/retries.rb +25 -21
- data/lib/httpx/plugins/stream.rb +2 -3
- data/lib/httpx/plugins/upgrade.rb +7 -6
- data/lib/httpx/registry.rb +2 -2
- data/lib/httpx/request.rb +10 -19
- data/lib/httpx/resolver/https.rb +0 -2
- data/lib/httpx/resolver/native.rb +15 -3
- data/lib/httpx/resolver/resolver_mixin.rb +2 -1
- data/lib/httpx/response.rb +72 -38
- data/lib/httpx/selector.rb +6 -7
- data/lib/httpx/session.rb +34 -21
- data/lib/httpx/session2.rb +23 -0
- data/lib/httpx/transcoder/body.rb +1 -1
- data/lib/httpx/transcoder/chunker.rb +2 -1
- data/lib/httpx/transcoder/form.rb +20 -0
- data/lib/httpx/transcoder/json.rb +12 -0
- data/lib/httpx/transcoder.rb +62 -1
- data/lib/httpx/utils.rb +2 -2
- data/lib/httpx/version.rb +1 -1
- data/lib/httpx.rb +6 -3
- data/sig/buffer.rbs +3 -1
- data/sig/chainable.rbs +30 -29
- data/sig/connection/http1.rbs +11 -5
- data/sig/connection/http2.rbs +16 -5
- data/sig/connection.rbs +23 -11
- data/sig/errors.rbs +35 -1
- data/sig/headers.rbs +20 -19
- data/sig/httpx.rbs +4 -1
- data/sig/loggable.rbs +3 -1
- data/sig/options.rbs +45 -34
- data/sig/parser/http1.rbs +3 -3
- data/sig/plugins/authentication.rbs +1 -1
- data/sig/plugins/aws_sdk_authentication.rbs +5 -1
- data/sig/plugins/aws_sigv4.rbs +13 -5
- data/sig/plugins/basic_authentication.rbs +1 -1
- data/sig/plugins/compression.rbs +4 -6
- data/sig/plugins/cookies/cookie.rbs +5 -7
- data/sig/plugins/cookies/jar.rbs +9 -10
- data/sig/plugins/cookies.rbs +4 -5
- data/sig/plugins/digest_authentication.rbs +2 -3
- data/sig/plugins/expect.rbs +2 -4
- data/sig/plugins/follow_redirects.rbs +3 -5
- data/sig/plugins/grpc.rbs +4 -7
- data/sig/plugins/h2c.rbs +0 -2
- data/sig/plugins/multipart.rbs +64 -10
- data/sig/plugins/ntlm_authentication.rbs +2 -3
- data/sig/plugins/persistent.rbs +3 -8
- data/sig/plugins/proxy/ssh.rbs +4 -4
- data/sig/plugins/proxy.rbs +13 -13
- data/sig/plugins/push_promise.rbs +0 -2
- data/sig/plugins/retries.rbs +4 -8
- data/sig/plugins/stream.rbs +1 -1
- data/sig/plugins/upgrade.rbs +2 -3
- data/sig/pool.rbs +1 -2
- data/sig/registry.rbs +1 -1
- data/sig/request.rbs +11 -8
- data/sig/resolver/native.rbs +12 -6
- data/sig/resolver/resolver_mixin.rbs +4 -5
- data/sig/resolver/system.rbs +2 -0
- data/sig/resolver.rbs +7 -0
- data/sig/response.rbs +24 -12
- data/sig/selector.rbs +11 -9
- data/sig/session.rbs +22 -23
- data/sig/transcoder/body.rbs +6 -1
- data/sig/transcoder/chunker.rbs +8 -2
- data/sig/transcoder/form.rbs +3 -1
- data/sig/transcoder/json.rbs +2 -0
- data/sig/transcoder.rbs +13 -5
- data/sig/utils.rbs +2 -0
- metadata +12 -2
data/sig/connection/http1.rbs
CHANGED
@@ -3,13 +3,17 @@ module HTTPX
|
|
3
3
|
include Callbacks
|
4
4
|
include Loggable
|
5
5
|
|
6
|
+
UPCASED: Hash[String, String]
|
7
|
+
MAX_REQUESTS: Integer
|
8
|
+
CRLF: String
|
9
|
+
|
6
10
|
attr_reader pending: Array[Request]
|
7
11
|
attr_reader requests: Array[Request]
|
8
12
|
|
9
13
|
@options: Options
|
10
14
|
@max_concurrent_requests: Integer
|
11
15
|
@max_requests: Integer
|
12
|
-
@parser: HTTP1
|
16
|
+
@parser: Parser::HTTP1
|
13
17
|
@buffer: Buffer
|
14
18
|
|
15
19
|
def interests: () -> io_interests?
|
@@ -30,11 +34,13 @@ module HTTPX
|
|
30
34
|
|
31
35
|
def handle_error: (StandardError ex) -> void
|
32
36
|
|
37
|
+
def on_start: () -> void
|
38
|
+
|
33
39
|
def on_headers: (Hash[String, Array[String]] headers) -> void
|
34
40
|
|
35
41
|
def on_trailers: (Hash[String, Array[String]] headers) -> void
|
36
42
|
|
37
|
-
def on_data: (
|
43
|
+
def on_data: (String chunk) -> void
|
38
44
|
|
39
45
|
def on_complete: () -> void
|
40
46
|
|
@@ -42,7 +48,7 @@ module HTTPX
|
|
42
48
|
|
43
49
|
def ping: () -> void
|
44
50
|
|
45
|
-
def timeout: () ->
|
51
|
+
def timeout: () -> Numeric
|
46
52
|
|
47
53
|
private
|
48
54
|
|
@@ -54,7 +60,7 @@ module HTTPX
|
|
54
60
|
|
55
61
|
def disable_pipelining: () -> void
|
56
62
|
|
57
|
-
def set_protocol_headers: (Request) -> _Each[
|
63
|
+
def set_protocol_headers: (Request) -> _Each[[String, String]]
|
58
64
|
|
59
65
|
def headline_uri: (Request) -> String
|
60
66
|
|
@@ -64,7 +70,7 @@ module HTTPX
|
|
64
70
|
|
65
71
|
def join_trailers: (Request request) -> void
|
66
72
|
|
67
|
-
def join_headers2: (_Each[
|
73
|
+
def join_headers2: (_Each[[String, String]] headers) -> void
|
68
74
|
|
69
75
|
def join_body: (Request request) -> void
|
70
76
|
|
data/sig/connection/http2.rbs
CHANGED
@@ -3,10 +3,13 @@ module HTTPX
|
|
3
3
|
include Callbacks
|
4
4
|
include Loggable
|
5
5
|
|
6
|
+
MAX_CONCURRENT_REQUESTS: Integer
|
7
|
+
|
6
8
|
attr_reader streams: Hash[Request, HTTP2Next::Stream]
|
7
9
|
attr_reader pending: Array[Request]
|
8
10
|
|
9
11
|
@options: Options
|
12
|
+
@settings: Hash[Symbol, Integer | bool]
|
10
13
|
@max_concurrent_requests: Integer
|
11
14
|
@max_requests: Integer
|
12
15
|
@drains: Hash[Request, String]
|
@@ -23,7 +26,7 @@ module HTTPX
|
|
23
26
|
|
24
27
|
def <<: (String) -> void
|
25
28
|
|
26
|
-
def can_buffer_more_requests
|
29
|
+
def can_buffer_more_requests?: () -> bool
|
27
30
|
|
28
31
|
def send: (Request) -> void
|
29
32
|
|
@@ -35,7 +38,7 @@ module HTTPX
|
|
35
38
|
|
36
39
|
alias reset init_connection
|
37
40
|
|
38
|
-
def timeout: () ->
|
41
|
+
def timeout: () -> Numeric
|
39
42
|
|
40
43
|
private
|
41
44
|
|
@@ -45,7 +48,7 @@ module HTTPX
|
|
45
48
|
|
46
49
|
def headline_uri: (Request) -> String
|
47
50
|
|
48
|
-
def set_protocol_headers: (Request) -> _Each[
|
51
|
+
def set_protocol_headers: (Request) -> _Each[[String, String]]
|
49
52
|
|
50
53
|
def handle: (Request request, HTTP2Next::Stream stream) -> void
|
51
54
|
|
@@ -61,9 +64,11 @@ module HTTPX
|
|
61
64
|
|
62
65
|
def on_stream_headers: (HTTP2Next::Stream stream, Request request, Array[[String, String]] headers) -> void
|
63
66
|
|
64
|
-
def on_stream_trailers: (HTTP2Next::Stream stream,
|
67
|
+
def on_stream_trailers: (HTTP2Next::Stream stream, Response response, Array[[String, String]] headers) -> void
|
68
|
+
|
69
|
+
def on_stream_data: (HTTP2Next::Stream stream, Request request, String data) -> void
|
65
70
|
|
66
|
-
def
|
71
|
+
def on_stream_refuse: (HTTP2Next::Stream stream, Request request, StandardError error) -> void
|
67
72
|
|
68
73
|
def on_stream_close: (HTTP2Next::Stream stream, Request request, (Symbol | StandardError)? error) -> void
|
69
74
|
|
@@ -74,12 +79,18 @@ module HTTPX
|
|
74
79
|
def on_close: (Integer last_frame, Symbol? error, String? payload) -> void
|
75
80
|
|
76
81
|
def on_frame_sent: (HTTP2Next::frame) -> void
|
82
|
+
|
77
83
|
def on_frame_received: (HTTP2Next::frame) -> void
|
78
84
|
|
85
|
+
def on_altsvc: (String origin, HTTP2Next::frame) -> void
|
86
|
+
|
79
87
|
def on_promise: (HTTP2Next::Stream) -> void
|
80
88
|
|
81
89
|
def on_origin: (String) -> void
|
82
90
|
|
83
91
|
def on_pong: (string ping) -> void
|
92
|
+
|
93
|
+
class Error < ::HTTPX::Error
|
94
|
+
end
|
84
95
|
end
|
85
96
|
end
|
data/sig/connection.rbs
CHANGED
@@ -4,45 +4,54 @@ module HTTPX
|
|
4
4
|
|
5
5
|
def on: (Symbol) { (*untyped) -> void } -> void
|
6
6
|
def empty?: () -> bool
|
7
|
+
# def exhausted?: () -> bool
|
7
8
|
def close: () -> void
|
8
9
|
def consume: () -> void
|
9
10
|
def <<: (string) -> void
|
11
|
+
# def send: (Request) -> void
|
12
|
+
# def ping: () -> void
|
13
|
+
# def timeout: () -> (Integer | Float)
|
14
|
+
|
10
15
|
end
|
11
16
|
|
17
|
+
extend Forwardable
|
12
18
|
include Loggable
|
13
19
|
include Callbacks
|
14
|
-
|
20
|
+
include HTTPX::Registry[String, Class]
|
21
|
+
|
22
|
+
BUFFER_SIZE: Integer
|
15
23
|
|
16
|
-
attr_reader origin:
|
24
|
+
attr_reader origin: URI::Generic
|
17
25
|
attr_reader state: Symbol
|
18
26
|
attr_reader pending: Array[Request]
|
19
|
-
attr_reader options:
|
27
|
+
attr_reader options: Options
|
28
|
+
attr_writer timers: untyped # Timers::Timer
|
20
29
|
|
21
30
|
def addresses: () -> Array[ipaddr]?
|
22
31
|
|
23
32
|
def addresses=: (Array[ipaddr]) -> void
|
24
33
|
|
25
|
-
def match?: (
|
34
|
+
def match?: (URI::Generic, options) -> bool
|
26
35
|
|
27
36
|
def mergeable?: (Connection) -> bool
|
28
37
|
|
29
38
|
def coalescable?: (Connection) -> bool
|
30
39
|
|
31
|
-
def create_idle: (options) -> Connection
|
32
|
-
| () -> Connection
|
40
|
+
def create_idle: (?Hash[Symbol, untyped] options) -> Connection
|
33
41
|
|
34
42
|
def merge: (Connection) -> void
|
35
43
|
|
36
44
|
def purge_pending: () { (Request) -> void } -> void
|
37
45
|
|
38
|
-
def match_altsvcs?: (
|
46
|
+
def match_altsvcs?: (URI::Generic uri) -> bool
|
39
47
|
|
40
48
|
def connecting?: () -> bool
|
49
|
+
|
41
50
|
def inflight?: () -> boolish
|
42
51
|
|
43
52
|
def interests: () -> io_interests?
|
44
53
|
|
45
|
-
def to_io: () ->
|
54
|
+
def to_io: () -> IO
|
46
55
|
|
47
56
|
def call: () -> void
|
48
57
|
|
@@ -55,7 +64,7 @@ module HTTPX
|
|
55
64
|
|
56
65
|
private
|
57
66
|
|
58
|
-
def initialize: (String,
|
67
|
+
def initialize: (String, URI::Generic, options) -> untyped
|
59
68
|
|
60
69
|
def connect: () -> void
|
61
70
|
|
@@ -76,10 +85,13 @@ module HTTPX
|
|
76
85
|
|
77
86
|
def handle_response: () -> void
|
78
87
|
|
79
|
-
def on_error: (StandardError) -> void
|
88
|
+
def on_error: (HTTPX::TimeoutError | Error | StandardError) -> void
|
80
89
|
|
81
90
|
def handle_error: (StandardError) -> void
|
82
91
|
|
83
|
-
def total_timeout: () ->
|
92
|
+
def total_timeout: () -> untyped?
|
93
|
+
# def total_timeout: () -> Timers::Timer?
|
94
|
+
#
|
95
|
+
def purge_after_closed: () -> void
|
84
96
|
end
|
85
97
|
end
|
data/sig/errors.rbs
CHANGED
@@ -1,3 +1,37 @@
|
|
1
1
|
module HTTPX
|
2
|
-
Error
|
2
|
+
class Error < StandardError
|
3
|
+
end
|
4
|
+
|
5
|
+
class TimeoutError < Error
|
6
|
+
attr_reader timeout: Numeric
|
7
|
+
|
8
|
+
def to_connection_error: () -> ConnectTimeoutError
|
9
|
+
private
|
10
|
+
|
11
|
+
def initialize: (Numeric timeout, String message) -> untyped
|
12
|
+
end
|
13
|
+
|
14
|
+
class TotalTimeoutError < TimeoutError
|
15
|
+
end
|
16
|
+
|
17
|
+
class ConnectTimeoutError < TimeoutError
|
18
|
+
end
|
19
|
+
|
20
|
+
class SettingsTimeoutError < TimeoutError
|
21
|
+
end
|
22
|
+
|
23
|
+
class ResolveTimeoutError < TimeoutError
|
24
|
+
end
|
25
|
+
|
26
|
+
class ResolveError < Error
|
27
|
+
end
|
28
|
+
|
29
|
+
class NativeResolveError < ResolveError
|
30
|
+
attr_reader connection: Connection
|
31
|
+
attr_reader host: String
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def initialize: (Connection connection, String hostname, ?String message) -> untyped
|
36
|
+
end
|
3
37
|
end
|
data/sig/headers.rbs
CHANGED
@@ -2,44 +2,45 @@ module HTTPX
|
|
2
2
|
class Headers
|
3
3
|
include _ToS
|
4
4
|
|
5
|
-
|
5
|
+
EMPTY: Array[untyped]
|
6
6
|
|
7
|
-
|
7
|
+
@headers: Hash[String, Array[String]]
|
8
|
+
|
9
|
+
def self.new: (?untyped headers) -> instance
|
8
10
|
|
9
11
|
def ==: (untyped other) -> bool
|
10
12
|
|
11
|
-
def []: (
|
12
|
-
def []=: (
|
13
|
+
def []: (String field) -> String?
|
14
|
+
def []=: (String field, headers_value value) -> void
|
13
15
|
|
14
|
-
def add: (
|
15
|
-
def delete: (
|
16
|
+
def add: (String field, string value) -> void
|
17
|
+
def delete: (String field) -> Array[String]?
|
16
18
|
|
17
|
-
def each: (?_Each[
|
18
|
-
| (?_Each[
|
19
|
+
def each: (?_Each[[String, String]]? extra_headers) { (String k, String v) -> void } -> void
|
20
|
+
| (?_Each[[String, String]]? extra_headers) -> Enumerable[[String, String]]
|
19
21
|
|
20
|
-
def get: (
|
21
|
-
def key?: (
|
22
|
+
def get: (String field) -> Array[String]
|
23
|
+
def key?: (String downcased_key) -> bool
|
22
24
|
|
23
|
-
def merge: (_Each[
|
25
|
+
def merge: (_Each[[String, headers_value]] other) -> Headers
|
24
26
|
|
25
27
|
def same_headers?: (untyped headers) -> bool
|
26
28
|
|
27
|
-
def to_a: () -> Array[[
|
28
|
-
def to_hash: () -> Hash[
|
29
|
+
def to_a: () -> Array[[String, String]]
|
30
|
+
def to_hash: () -> Hash[String, String]
|
29
31
|
alias to_h to_hash
|
30
32
|
|
31
|
-
def inspect: () -> String
|
33
|
+
def inspect: () -> String
|
32
34
|
|
33
35
|
private
|
34
36
|
|
35
|
-
def initialize: (headers?) -> untyped
|
37
|
+
def initialize: (?headers?) -> untyped
|
36
38
|
def array_value: (headers_value) -> Array[String]
|
37
|
-
def downcased: (
|
39
|
+
def downcased: (_ToS field) -> String
|
38
40
|
end
|
39
41
|
|
40
|
-
type headers_key = String | Symbol
|
41
42
|
type headers_value = _ToS | Array[_ToS]
|
42
|
-
type headers_hash = Hash[
|
43
|
-
type headers_input = headers_hash | Array[[
|
43
|
+
type headers_hash = Hash[_ToS, headers_value]
|
44
|
+
type headers_input = headers_hash | Array[[_ToS, string]]
|
44
45
|
type headers = Headers | headers_input
|
45
46
|
end
|
data/sig/httpx.rbs
CHANGED
@@ -4,12 +4,15 @@ module HTTPX
|
|
4
4
|
VERSION: String
|
5
5
|
|
6
6
|
type uri = URI::HTTP | URI::HTTPS | string
|
7
|
-
type generic_uri =
|
7
|
+
type generic_uri = String | URI::Generic
|
8
8
|
|
9
9
|
type verb = :options | :get | :head | :post | :put | :delete | :trace | :connect |
|
10
10
|
:propfind | :proppatch | :mkcol | :copy | :move | :lock | :unlock | :orderpatch |
|
11
11
|
:acl | :report | :patch | :search
|
12
12
|
|
13
13
|
module Plugins
|
14
|
+
def self?.load_plugin: (Symbol) -> Module
|
15
|
+
|
16
|
+
def self?.register_plugin: (Symbol, Module) -> void
|
14
17
|
end
|
15
18
|
end
|
data/sig/loggable.rbs
CHANGED
@@ -4,8 +4,10 @@ module HTTPX
|
|
4
4
|
end
|
5
5
|
|
6
6
|
module Loggable
|
7
|
+
COLORS: Hash[Symbol, Integer]
|
8
|
+
|
7
9
|
def log: (?level: Integer?, ?color: Symbol?) { () -> String } -> void
|
8
10
|
|
9
|
-
def log_exception: (
|
11
|
+
def log_exception: (Exception error, ?level: Integer, ?color: Symbol) -> void
|
10
12
|
end
|
11
13
|
end
|
data/sig/options.rbs
CHANGED
@@ -4,109 +4,120 @@ module HTTPX
|
|
4
4
|
|
5
5
|
WINDOW_SIZE: Integer
|
6
6
|
MAX_BODY_THRESHOLD_SIZE: Integer
|
7
|
+
CONNECT_TIMEOUT: Integer
|
8
|
+
OPERATION_TIMEOUT: Integer
|
9
|
+
KEEP_ALIVE_TIMEOUT: Integer
|
10
|
+
SETTINGS_TIMEOUT: Integer
|
11
|
+
DEFAULT_OPTIONS: Hash[Symbol, untyped]
|
7
12
|
|
8
13
|
type timeout_type = :connect_timeout | :settings_timeout | :operation_timeout | :keep_alive_timeout | :total_timeout
|
9
|
-
type timeout = Hash[timeout_type, Numeric
|
14
|
+
type timeout = Hash[timeout_type, Numeric]
|
10
15
|
|
11
|
-
def self.new: (options) -> instance
|
12
|
-
| () -> instance
|
16
|
+
def self.new: (?options) -> instance
|
13
17
|
|
18
|
+
def self.def_option: (Symbol, ?String) -> void
|
19
|
+
| (Symbol) { (*nil) -> untyped } -> void
|
14
20
|
# headers
|
15
21
|
attr_reader uri: URI?
|
16
|
-
def uri=: (uri) -> void
|
17
22
|
|
18
23
|
# headers
|
19
24
|
attr_reader headers: Headers?
|
20
|
-
def headers=: (headers) -> void
|
21
25
|
|
22
26
|
# timeout
|
23
27
|
attr_reader timeout: timeout
|
24
|
-
|
28
|
+
|
29
|
+
# http2_settings
|
30
|
+
attr_reader http2_settings: Hash[Symbol, Integer | bool]
|
25
31
|
|
26
32
|
# max_concurrent_requests
|
27
33
|
attr_reader max_concurrent_requests: Integer?
|
28
|
-
def max_concurrent_requests=: (Integer) -> void
|
29
34
|
|
30
35
|
# max_requests
|
31
36
|
attr_reader max_requests: Integer?
|
32
|
-
def max_requests=: (Integer) -> void
|
33
37
|
|
34
38
|
# window_size
|
35
|
-
attr_reader window_size:
|
36
|
-
def window_size=: (int) -> void
|
39
|
+
attr_reader window_size: Integer
|
37
40
|
|
38
41
|
# body_threshold_size
|
39
|
-
attr_reader body_threshold_size:
|
40
|
-
def body_threshold_size=: (int) -> void
|
42
|
+
attr_reader body_threshold_size: Integer
|
41
43
|
|
42
44
|
# transport
|
43
|
-
attr_reader transport:
|
44
|
-
def transport=: (_ToS) -> void
|
45
|
+
attr_reader transport: String?
|
45
46
|
|
46
47
|
# transport_options
|
47
48
|
attr_reader transport_options: Hash[untyped, untyped]?
|
48
|
-
def transport_options=: (Hash[untyped, untyped]) -> void
|
49
49
|
|
50
50
|
# addresses
|
51
|
-
attr_reader addresses:
|
52
|
-
def addresses=: (_ToAry[untyped]) -> void
|
51
|
+
attr_reader addresses: Array[ipaddr]?
|
53
52
|
|
54
53
|
# params
|
55
54
|
attr_reader params: Transcoder::urlencoded_input?
|
56
|
-
def params=: (Transcoder::urlencoded_input) -> void
|
57
55
|
|
58
56
|
# form
|
59
57
|
attr_reader form: Transcoder::urlencoded_input?
|
60
|
-
def form=: (Transcoder::urlencoded_input) -> void
|
61
58
|
|
62
59
|
# json
|
63
60
|
attr_reader json: _ToJson?
|
64
|
-
def json=: (_ToJson) -> void
|
65
61
|
|
66
62
|
# body
|
67
63
|
attr_reader body: bodyIO?
|
68
|
-
|
64
|
+
|
65
|
+
# body
|
66
|
+
attr_reader origin: URI::Generic?
|
69
67
|
|
70
68
|
# ssl
|
71
69
|
|
72
70
|
# http2_settings
|
73
71
|
|
72
|
+
|
73
|
+
# classes
|
74
|
+
attr_reader connection_class: singleton(Connection)
|
75
|
+
|
76
|
+
attr_reader request_class: singleton(Request)
|
77
|
+
|
78
|
+
attr_reader response_class: singleton(Response)
|
79
|
+
|
80
|
+
attr_reader headers_class: singleton(Headers)
|
81
|
+
|
82
|
+
attr_reader request_body_class: singleton(Request::Body)
|
83
|
+
|
84
|
+
attr_reader response_body_class: singleton(Response::Body)
|
85
|
+
|
86
|
+
attr_reader ssl: Hash[Symbol, untyped]
|
87
|
+
|
74
88
|
# request_class response_class headers_class request_body_class
|
75
89
|
# response_body_class connection_class
|
76
90
|
# resolver_class resolver_options
|
77
91
|
|
78
|
-
# request_class
|
79
|
-
attr_reader request_class: singleton(Request)
|
80
|
-
def request_class=: (singleton(Request)) -> void
|
81
|
-
|
82
92
|
# io
|
83
93
|
type io_option = _ToIO | Hash[String, _ToIO]
|
84
94
|
attr_reader io: io_option?
|
85
|
-
def io=: (io_option) -> void
|
86
95
|
|
87
96
|
# fallback_protocol
|
88
97
|
attr_reader fallback_protocol: String?
|
89
|
-
def fallback_protocol=: (String) -> void
|
90
98
|
|
91
99
|
# debug
|
92
100
|
attr_reader debug: _IOLogger?
|
93
|
-
def debug=: (_IOLogger) -> void
|
94
101
|
|
95
102
|
# debug_level
|
96
|
-
attr_reader debug_level: Integer
|
97
|
-
def debug_level=: (Integer) -> void
|
103
|
+
attr_reader debug_level: Integer
|
98
104
|
|
99
105
|
# persistent
|
100
106
|
attr_reader persistent: bool?
|
101
|
-
|
107
|
+
|
108
|
+
# resolver_options
|
109
|
+
attr_reader resolver_options: Hash[Symbol, untyped]?
|
102
110
|
|
103
111
|
def ==: (untyped other) -> bool
|
104
|
-
def merge: (_ToHash other) -> instance
|
112
|
+
def merge: (_ToHash[Symbol, untyped] other) -> instance
|
113
|
+
def to_hash: () -> Hash[Symbol, untyped]
|
105
114
|
|
106
115
|
private
|
107
116
|
|
108
|
-
|
117
|
+
REQUEST_IVARS: Array[Symbol]
|
118
|
+
|
119
|
+
def initialize: (?options options) -> untyped
|
109
120
|
end
|
110
121
|
|
111
|
-
type options = Options | Hash[Symbol
|
122
|
+
type options = Options | Hash[Symbol, untyped]
|
112
123
|
end
|