httpx 0.8.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +48 -0
- data/README.md +9 -5
- 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 +39 -0
- data/doc/release_notes/0_1_0.md +9 -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/lib/httpx.rb +2 -0
- data/lib/httpx/adapters/faraday.rb +1 -1
- data/lib/httpx/chainable.rb +11 -11
- data/lib/httpx/connection.rb +23 -31
- data/lib/httpx/connection/http1.rb +30 -4
- data/lib/httpx/connection/http2.rb +29 -10
- data/lib/httpx/domain_name.rb +440 -0
- data/lib/httpx/errors.rb +2 -1
- data/lib/httpx/extensions.rb +22 -2
- data/lib/httpx/headers.rb +2 -2
- data/lib/httpx/io/ssl.rb +0 -1
- data/lib/httpx/io/tcp.rb +6 -5
- data/lib/httpx/io/udp.rb +4 -1
- data/lib/httpx/options.rb +5 -1
- data/lib/httpx/parser/http1.rb +14 -17
- data/lib/httpx/plugins/compression.rb +46 -65
- data/lib/httpx/plugins/compression/brotli.rb +10 -14
- data/lib/httpx/plugins/compression/deflate.rb +7 -6
- data/lib/httpx/plugins/compression/gzip.rb +23 -5
- data/lib/httpx/plugins/cookies.rb +21 -60
- data/lib/httpx/plugins/cookies/cookie.rb +173 -0
- data/lib/httpx/plugins/cookies/jar.rb +74 -0
- data/lib/httpx/plugins/cookies/set_cookie_parser.rb +142 -0
- data/lib/httpx/plugins/expect.rb +12 -1
- data/lib/httpx/plugins/follow_redirects.rb +20 -2
- data/lib/httpx/plugins/h2c.rb +1 -1
- data/lib/httpx/plugins/multipart.rb +12 -6
- data/lib/httpx/plugins/persistent.rb +6 -1
- data/lib/httpx/plugins/proxy.rb +16 -2
- data/lib/httpx/plugins/proxy/socks4.rb +14 -14
- data/lib/httpx/plugins/rate_limiter.rb +51 -0
- data/lib/httpx/plugins/retries.rb +3 -2
- data/lib/httpx/plugins/stream.rb +109 -13
- data/lib/httpx/pool.rb +14 -17
- data/lib/httpx/request.rb +8 -20
- data/lib/httpx/resolver.rb +7 -10
- data/lib/httpx/resolver/https.rb +22 -24
- data/lib/httpx/resolver/native.rb +19 -16
- data/lib/httpx/resolver/resolver_mixin.rb +4 -2
- data/lib/httpx/resolver/system.rb +2 -2
- data/lib/httpx/response.rb +16 -25
- data/lib/httpx/selector.rb +11 -18
- data/lib/httpx/session.rb +40 -26
- data/lib/httpx/transcoder.rb +18 -0
- data/lib/httpx/transcoder/chunker.rb +0 -2
- data/lib/httpx/transcoder/form.rb +9 -7
- data/lib/httpx/transcoder/json.rb +0 -4
- data/lib/httpx/utils.rb +45 -0
- data/lib/httpx/version.rb +1 -1
- data/sig/buffer.rbs +24 -0
- data/sig/callbacks.rbs +14 -0
- data/sig/chainable.rbs +37 -0
- data/sig/connection.rbs +85 -0
- data/sig/connection/http1.rbs +66 -0
- data/sig/connection/http2.rbs +78 -0
- data/sig/domain_name.rbs +17 -0
- data/sig/errors.rbs +3 -0
- data/sig/headers.rbs +42 -0
- data/sig/httpx.rbs +15 -0
- data/sig/loggable.rbs +11 -0
- data/sig/missing.rbs +12 -0
- data/sig/options.rbs +118 -0
- data/sig/parser/http1.rbs +50 -0
- data/sig/plugins/authentication.rbs +11 -0
- data/sig/plugins/basic_authentication.rbs +13 -0
- data/sig/plugins/compression.rbs +55 -0
- data/sig/plugins/compression/brotli.rbs +21 -0
- data/sig/plugins/compression/deflate.rbs +17 -0
- data/sig/plugins/compression/gzip.rbs +29 -0
- data/sig/plugins/cookies.rbs +26 -0
- data/sig/plugins/cookies/cookie.rbs +50 -0
- data/sig/plugins/cookies/jar.rbs +27 -0
- data/sig/plugins/digest_authentication.rbs +33 -0
- data/sig/plugins/expect.rbs +19 -0
- data/sig/plugins/follow_redirects.rbs +37 -0
- data/sig/plugins/h2c.rbs +26 -0
- data/sig/plugins/multipart.rbs +21 -0
- data/sig/plugins/persistent.rbs +17 -0
- data/sig/plugins/proxy.rbs +47 -0
- data/sig/plugins/proxy/http.rbs +14 -0
- data/sig/plugins/proxy/socks4.rbs +33 -0
- data/sig/plugins/proxy/socks5.rbs +36 -0
- data/sig/plugins/proxy/ssh.rbs +18 -0
- data/sig/plugins/push_promise.rbs +22 -0
- data/sig/plugins/rate_limiter.rbs +11 -0
- data/sig/plugins/retries.rbs +48 -0
- data/sig/plugins/stream.rbs +39 -0
- data/sig/pool.rbs +36 -0
- data/sig/registry.rbs +9 -0
- data/sig/request.rbs +61 -0
- data/sig/resolver.rbs +26 -0
- data/sig/resolver/https.rbs +49 -0
- data/sig/resolver/native.rbs +60 -0
- data/sig/resolver/resolver_mixin.rbs +27 -0
- data/sig/resolver/system.rbs +17 -0
- data/sig/response.rbs +87 -0
- data/sig/selector.rbs +20 -0
- data/sig/session.rbs +49 -0
- data/sig/timeout.rbs +29 -0
- data/sig/transcoder.rbs +18 -0
- data/sig/transcoder/body.rbs +18 -0
- data/sig/transcoder/chunker.rbs +32 -0
- data/sig/transcoder/form.rbs +16 -0
- data/sig/transcoder/json.rbs +14 -0
- metadata +128 -22
- data/lib/httpx/resolver/options.rb +0 -25
data/sig/callbacks.rbs
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module HTTPX
|
2
|
+
interface _Callable
|
3
|
+
def call: (*untyped) -> void
|
4
|
+
end
|
5
|
+
|
6
|
+
module Callbacks
|
7
|
+
def on: (Symbol) { (*untyped) -> void } -> void
|
8
|
+
def once: (Symbol) { (*untyped) -> void } -> void
|
9
|
+
def emit: (Symbol, *untyped) -> void
|
10
|
+
|
11
|
+
def callbacks: () -> Hash[Symbol, Array[_Callable]]
|
12
|
+
| (Symbol) -> Array[_Callable]
|
13
|
+
end
|
14
|
+
end
|
data/sig/chainable.rbs
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
module HTTPX
|
2
|
+
module Chainable
|
3
|
+
def request: (*untyped, **untyped) -> (response | Array[response])
|
4
|
+
def accept: (String) -> Session
|
5
|
+
def wrap: () { (Session) -> void } -> void
|
6
|
+
| () -> void
|
7
|
+
|
8
|
+
def with: (options) -> Session
|
9
|
+
| (options) { (Session) -> Session} -> Session
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
def plugin: (:authentication) -> Plugins::sessionAuthentication
|
15
|
+
| (:basic_authentication) -> Plugins::sessionBasicAuthentication
|
16
|
+
| (:digest_authentication) -> Plugins::sessionDigestAuthentication
|
17
|
+
| (:compression) -> Session
|
18
|
+
| (:cookies) -> Plugins::sessionCookies
|
19
|
+
| (:expect) -> Session
|
20
|
+
| (:follow_redirects) -> Plugins::sessionFollowRedirects
|
21
|
+
| (:h2c) -> Plugins::sessionH2C
|
22
|
+
| (:multipart) -> Session
|
23
|
+
| (:persistent) -> Plugins::sessionPersistent
|
24
|
+
| (:proxy) -> Plugins::sessionProxy
|
25
|
+
| (:push_promise) -> Plugins::sessionPushPromise
|
26
|
+
| (:retries) -> Plugins::sessionRetries
|
27
|
+
| (:stream) -> Plugins::sessionStream
|
28
|
+
| (Symbol | Module, ?options?) { (Class) -> void } -> Session
|
29
|
+
| (Symbol | Module, ?options?) -> Session
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def default_options: () -> Options
|
34
|
+
def branch: (options) -> Session
|
35
|
+
| (options) { (Session) -> Session } -> Session
|
36
|
+
end
|
37
|
+
end
|
data/sig/connection.rbs
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class Connection
|
3
|
+
interface _Parser
|
4
|
+
|
5
|
+
def on: (Symbol) { (*untyped) -> void } -> void
|
6
|
+
def empty?: () -> bool
|
7
|
+
def close: () -> void
|
8
|
+
def consume: () -> void
|
9
|
+
def <<: (string) -> void
|
10
|
+
end
|
11
|
+
|
12
|
+
include Loggable
|
13
|
+
include Callbacks
|
14
|
+
extend HTTPX::Registry[String, Class]
|
15
|
+
|
16
|
+
attr_reader origin: generic_uri
|
17
|
+
attr_reader state: Symbol
|
18
|
+
attr_reader pending: Array[Request]
|
19
|
+
attr_reader options: options
|
20
|
+
|
21
|
+
def addresses: () -> Array[ipaddr]?
|
22
|
+
|
23
|
+
def addresses=: (Array[ipaddr]) -> void
|
24
|
+
|
25
|
+
def match?: (generic_uri, options) -> bool
|
26
|
+
|
27
|
+
def mergeable?: (Connection) -> bool
|
28
|
+
|
29
|
+
def coalescable?: (Connection) -> bool
|
30
|
+
|
31
|
+
def create_idle: (options) -> Connection
|
32
|
+
| () -> Connection
|
33
|
+
|
34
|
+
def merge: (Connection) -> void
|
35
|
+
|
36
|
+
def purge_pending: () { (Request) -> void } -> void
|
37
|
+
|
38
|
+
def match_altsvcs?: (generic_uri) -> bool
|
39
|
+
|
40
|
+
def connecting?: () -> bool
|
41
|
+
def inflight?: () -> boolish
|
42
|
+
|
43
|
+
def interests: () -> io_interests?
|
44
|
+
|
45
|
+
def to_io: () -> _ToIO
|
46
|
+
|
47
|
+
def call: () -> void
|
48
|
+
|
49
|
+
def close: () -> void
|
50
|
+
def reset: () -> void
|
51
|
+
|
52
|
+
def send: (Request) -> void
|
53
|
+
|
54
|
+
def timeout: () -> Numeric?
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
def initialize: (String, generic_uri, options) -> untyped
|
59
|
+
|
60
|
+
def connect: () -> void
|
61
|
+
|
62
|
+
def exhausted?: () -> boolish
|
63
|
+
|
64
|
+
def consume: () -> void
|
65
|
+
|
66
|
+
def send_pending: () -> void
|
67
|
+
|
68
|
+
def parser: () -> _Parser
|
69
|
+
|
70
|
+
def build_parser: () -> _Parser
|
71
|
+
| (String) -> _Parser
|
72
|
+
|
73
|
+
def set_parser_callbacks: (_Parser) -> void
|
74
|
+
|
75
|
+
def transition: (Symbol) -> void
|
76
|
+
|
77
|
+
def handle_response: () -> void
|
78
|
+
|
79
|
+
def on_error: (StandardError) -> void
|
80
|
+
|
81
|
+
def handle_error: (StandardError) -> void
|
82
|
+
|
83
|
+
def total_timeout: () -> Timers::Timer?
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class Connection::HTTP1
|
3
|
+
include Callbacks
|
4
|
+
include Loggable
|
5
|
+
|
6
|
+
attr_reader pending: Array[Request]
|
7
|
+
|
8
|
+
@options: Options
|
9
|
+
@max_concurrent_requests: Integer
|
10
|
+
@max_requests: Integer
|
11
|
+
@parser: HTTP1
|
12
|
+
@buffer: Buffer
|
13
|
+
|
14
|
+
def interests: () -> io_interests?
|
15
|
+
|
16
|
+
def reset: () -> void
|
17
|
+
|
18
|
+
def close: () -> void
|
19
|
+
|
20
|
+
def empty?: () -> bool
|
21
|
+
|
22
|
+
def exhausted?: () -> bool
|
23
|
+
|
24
|
+
def <<: (String) -> void
|
25
|
+
|
26
|
+
def send: (Request) -> void
|
27
|
+
|
28
|
+
def consume: () -> void
|
29
|
+
|
30
|
+
def handle_error: (StandardError ex) -> void
|
31
|
+
|
32
|
+
def on_headers: (Hash[String, Array[String]] headers) -> void
|
33
|
+
|
34
|
+
def on_trailers: (Array[String, String] headers) -> void
|
35
|
+
|
36
|
+
def on_data: (string chunk) -> void
|
37
|
+
|
38
|
+
def on_complete: () -> void
|
39
|
+
|
40
|
+
def dispatch: () -> void
|
41
|
+
|
42
|
+
def ping: () -> void
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def initialize: (Buffer, options) -> untyped
|
47
|
+
|
48
|
+
def manage_connection: (Response) -> void
|
49
|
+
|
50
|
+
def disable: () -> void
|
51
|
+
|
52
|
+
def disable_pipelining: () -> void
|
53
|
+
|
54
|
+
def set_request_headers: (Request) -> void
|
55
|
+
|
56
|
+
def headline_uri: (Request) -> String
|
57
|
+
|
58
|
+
def handle: (Request request) -> void
|
59
|
+
|
60
|
+
def join_headers: (Request request) -> void
|
61
|
+
|
62
|
+
def join_body: (Request request) -> void
|
63
|
+
|
64
|
+
def capitalized: (String field) -> String
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class Connection::HTTP2
|
3
|
+
include Callbacks
|
4
|
+
include Loggable
|
5
|
+
|
6
|
+
attr_reader streams: Hash[HTTP2Next::Stream, Response]
|
7
|
+
attr_reader pending: Array[Request]
|
8
|
+
|
9
|
+
@options: Options
|
10
|
+
@max_concurrent_requests: Integer
|
11
|
+
@max_requests: Integer
|
12
|
+
@drains: Hash[Request, String]
|
13
|
+
@pings: Array[String]
|
14
|
+
@buffer: Buffer
|
15
|
+
|
16
|
+
def interests: () -> io_interests
|
17
|
+
|
18
|
+
def close: () -> void
|
19
|
+
|
20
|
+
def empty?: () -> bool
|
21
|
+
|
22
|
+
def exhausted?: () -> bool
|
23
|
+
|
24
|
+
def <<: (String) -> void
|
25
|
+
|
26
|
+
def send: (Request) -> void
|
27
|
+
|
28
|
+
def consume: () -> void
|
29
|
+
|
30
|
+
def handle_error: (StandardError ex) -> void
|
31
|
+
|
32
|
+
def ping: () -> void
|
33
|
+
|
34
|
+
alias reset init_connection
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def initialize: (Buffer, options) -> untyped
|
39
|
+
|
40
|
+
def send_pending: () -> void
|
41
|
+
|
42
|
+
def headline_uri: (Request) -> String
|
43
|
+
|
44
|
+
def set_request_headers: (Request) -> void
|
45
|
+
|
46
|
+
def handle: (Request request, HTTP2Next::Stream stream) -> void
|
47
|
+
|
48
|
+
def init_connection: () -> void
|
49
|
+
|
50
|
+
def handle_stream: (HTTP2Next::Stream stream, Request request) -> void
|
51
|
+
|
52
|
+
def join_headers: (HTTP2Next::Stream stream, Request request) -> void
|
53
|
+
|
54
|
+
def join_body: (HTTP2Next::Stream stream, Request request) -> void
|
55
|
+
|
56
|
+
|
57
|
+
# def on_stream_headers: (HTTP2Next::Stream stream, Request request, Array[String, String] headers) -> void
|
58
|
+
|
59
|
+
# def on_stream_data: (HTTP2Next::Stream stream, Request request, string data) -> void
|
60
|
+
|
61
|
+
# def on_stream_close: (HTTP2Next::Stream stream, Request request, Symbol? error) -> void
|
62
|
+
|
63
|
+
def on_frame: (string bytes) -> void
|
64
|
+
|
65
|
+
def on_settings: (*untyped) -> void
|
66
|
+
|
67
|
+
def on_close: (Integer last_frame, Symbol? error, String? payload) -> void
|
68
|
+
|
69
|
+
def on_frame_sent: (HTTP2Next::frame) -> void
|
70
|
+
def on_frame_received: (HTTP2Next::frame) -> void
|
71
|
+
|
72
|
+
def on_promise: (HTTP2Next::Stream) -> void
|
73
|
+
|
74
|
+
def on_origin: (String) -> void
|
75
|
+
|
76
|
+
def on_pong: (string ping) -> void
|
77
|
+
end
|
78
|
+
end
|
data/sig/domain_name.rbs
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class DomainName
|
3
|
+
type domain = string | DomainName
|
4
|
+
|
5
|
+
include Comparable
|
6
|
+
|
7
|
+
def normalize: (String) -> String
|
8
|
+
|
9
|
+
def cookie_domain?: (domain, ?bool?) -> bool
|
10
|
+
|
11
|
+
def self.new: (domain) -> untyped
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def initialize: (string) -> untyped
|
16
|
+
end
|
17
|
+
end
|
data/sig/errors.rbs
ADDED
data/sig/headers.rbs
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class Headers
|
3
|
+
include _ToS
|
4
|
+
|
5
|
+
@headers: headers_hash
|
6
|
+
|
7
|
+
def self.new: (?untyped headers) -> Headers
|
8
|
+
|
9
|
+
def ==: (untyped other) -> bool
|
10
|
+
|
11
|
+
def []: (headers_key field) -> _ToS?
|
12
|
+
def []=: (headers_key field, headers_value value) -> void
|
13
|
+
|
14
|
+
def add: (headers_key field, string value) -> void
|
15
|
+
def delete: (headers_key field) -> void
|
16
|
+
|
17
|
+
def each: () { (headers_key, String) -> void } -> void
|
18
|
+
| () -> Enumerable[[headers_key, String], void]
|
19
|
+
|
20
|
+
def get: (headers_key field) -> Array[String]
|
21
|
+
def key?: (headers_key downcased_key) -> bool
|
22
|
+
|
23
|
+
def merge: (_Each[headers_key, headers_value] other) -> Headers
|
24
|
+
|
25
|
+
def same_headers?: (untyped headers) -> bool
|
26
|
+
|
27
|
+
def to_a: () -> Array[[headers_key, String]]
|
28
|
+
def inspect: () -> String
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def initialize: (headers?) -> untyped
|
33
|
+
def array_value: (headers_value) -> Array[String]
|
34
|
+
def downcased: (headers_key) -> String
|
35
|
+
end
|
36
|
+
|
37
|
+
type headers_key = String | Symbol
|
38
|
+
type headers_value = _ToS | Array[_ToS]
|
39
|
+
type headers_hash = Hash[headers_key, headers_value]
|
40
|
+
type headers_input = headers_hash | Array[[headers_key, string]]
|
41
|
+
type headers = Headers | headers_input
|
42
|
+
end
|
data/sig/httpx.rbs
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module HTTPX
|
2
|
+
extend Chainable
|
3
|
+
|
4
|
+
VERSION: String
|
5
|
+
|
6
|
+
type uri = URI::HTTP | URI::HTTPS | string
|
7
|
+
type generic_uri = uri | URI::Generic
|
8
|
+
|
9
|
+
type verb = :options | :get | :head | :post | :put | :delete | :trace | :connect |
|
10
|
+
:propfind | :proppatch | :mkcol | :copy | :move | :lock | :unlock | :orderpatch |
|
11
|
+
:acl | :report | :patch | :search
|
12
|
+
|
13
|
+
module Plugins
|
14
|
+
end
|
15
|
+
end
|
data/sig/loggable.rbs
ADDED
data/sig/missing.rbs
ADDED
data/sig/options.rbs
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
module HTTPX
|
2
|
+
class Options
|
3
|
+
# include _ToHash
|
4
|
+
|
5
|
+
WINDOW_SIZE: Integer
|
6
|
+
MAX_BODY_THRESHOLD_SIZE: Integer
|
7
|
+
|
8
|
+
def self.new: (options) -> instance
|
9
|
+
| () -> instance
|
10
|
+
|
11
|
+
# headers
|
12
|
+
attr_reader headers: Headers?
|
13
|
+
def headers=: (headers) -> void
|
14
|
+
def with_headers: (headers) -> instance
|
15
|
+
|
16
|
+
# timeout
|
17
|
+
attr_reader timeout: Timeout?
|
18
|
+
def timeout=: (Hash[Symbol, untyped] | Timeout) -> void
|
19
|
+
def with_timeout: (Hash[Symbol, untyped] | Timeout) -> instance
|
20
|
+
|
21
|
+
# max_concurrent_requests
|
22
|
+
attr_reader max_concurrent_requests: Integer?
|
23
|
+
def max_concurrent_requests=: (Integer) -> void
|
24
|
+
def with_max_concurrent_requests: (Integer) -> instance
|
25
|
+
|
26
|
+
# max_requests
|
27
|
+
attr_reader max_requests: Integer?
|
28
|
+
def max_requests=: (Integer) -> void
|
29
|
+
def with_max_requests: (Integer) -> instance
|
30
|
+
|
31
|
+
# window_size
|
32
|
+
attr_reader window_size: int?
|
33
|
+
def window_size=: (int) -> void
|
34
|
+
def with_window_size: (int) -> instance
|
35
|
+
|
36
|
+
# body_threshold_size
|
37
|
+
attr_reader body_threshold_size: int?
|
38
|
+
def body_threshold_size=: (int) -> void
|
39
|
+
def with_body_threshold_size: (int) -> instance
|
40
|
+
|
41
|
+
# transport
|
42
|
+
attr_reader transport: _ToS?
|
43
|
+
def transport=: (_ToS) -> void
|
44
|
+
def with_transport: (_ToS) -> instance
|
45
|
+
|
46
|
+
# transport_options
|
47
|
+
attr_reader transport_options: Hash[untyped, untyped]?
|
48
|
+
def transport_options=: (Hash[untyped, untyped]) -> void
|
49
|
+
def with_transport_options: (Hash[untyped, untyped]) -> instance
|
50
|
+
|
51
|
+
# params
|
52
|
+
attr_reader params: Transcoder::urlencoded_input?
|
53
|
+
def params=: (Transcoder::urlencoded_input) -> void
|
54
|
+
def with_params: (Transcoder::urlencoded_input) -> instance
|
55
|
+
|
56
|
+
# form
|
57
|
+
attr_reader form: Transcoder::urlencoded_input?
|
58
|
+
def form=: (Transcoder::urlencoded_input) -> void
|
59
|
+
def with_form: (Transcoder::urlencoded_input) -> instance
|
60
|
+
|
61
|
+
# json
|
62
|
+
attr_reader json: _ToJson?
|
63
|
+
def json=: (_ToJson) -> void
|
64
|
+
def with_json: (_ToJson) -> instance
|
65
|
+
|
66
|
+
# body
|
67
|
+
attr_reader body: bodyIO?
|
68
|
+
def body=: (bodyIO) -> void
|
69
|
+
def with_body: (bodyIO) -> instance
|
70
|
+
|
71
|
+
# ssl
|
72
|
+
|
73
|
+
# http2_settings
|
74
|
+
|
75
|
+
# request_class response_class headers_class request_body_class
|
76
|
+
# response_body_class connection_class
|
77
|
+
# resolver_class resolver_options
|
78
|
+
|
79
|
+
# request_class
|
80
|
+
attr_reader request_class: singleton(Request)
|
81
|
+
def request_class=: (singleton(Request)) -> void
|
82
|
+
def with_request_class: (singleton(Request)) -> instance
|
83
|
+
|
84
|
+
# io
|
85
|
+
attr_reader io: _ToIO?
|
86
|
+
def io=: (_ToIO) -> void
|
87
|
+
def with_io: (_ToIO) -> instance
|
88
|
+
|
89
|
+
# fallback_protocol
|
90
|
+
attr_reader fallback_protocol: String?
|
91
|
+
def fallback_protocol=: (String) -> void
|
92
|
+
def with_fallback_protocol: (String) -> instance
|
93
|
+
|
94
|
+
# debug
|
95
|
+
attr_reader debug: _IOLogger?
|
96
|
+
def debug=: (_IOLogger) -> void
|
97
|
+
def with_debug: (_IOLogger) -> instance
|
98
|
+
|
99
|
+
# debug_level
|
100
|
+
attr_reader debug_level: Integer?
|
101
|
+
def debug_level=: (Integer) -> void
|
102
|
+
def with_debug_level: (Integer) -> instance
|
103
|
+
|
104
|
+
# persistent
|
105
|
+
attr_reader persistent: bool?
|
106
|
+
def persistent=: (bool) -> void
|
107
|
+
def with_persistent: (bool) -> instance
|
108
|
+
|
109
|
+
def ==: (untyped other) -> bool
|
110
|
+
def merge: (_ToHash other) -> instance
|
111
|
+
|
112
|
+
private
|
113
|
+
|
114
|
+
def initialize: (options) -> untyped
|
115
|
+
end
|
116
|
+
|
117
|
+
type options = Options | Hash[Symbol | String, untyped]
|
118
|
+
end
|