-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsession.rbs
56 lines (36 loc) · 2.05 KB
/
session.rbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
module HTTPX
class Session
include Loggable
include Chainable
EMPTY_HASH: Hash[untyped, untyped]
@options: Options
@responses: Hash[Request, response]
@persistent: bool?
def self.plugin: (Symbol | Module plugin, ?options? options) ?{ (Class) -> void } -> singleton(Session)
def wrap: () { (instance) -> void } -> void
def close: (*untyped) -> void
def build_request: (verb, generic_uri, ?options) -> Request
private
def initialize: (?options) { (self) -> void } -> untyped
| (?options) -> untyped
def pool: -> Pool
def on_response: (Request, response) -> void
def on_promise: (untyped, untyped) -> void
def fetch_response: (Request request, Array[Connection] connections, untyped options) -> response?
def find_connection: (Request request, Array[Connection] connections, Options options) -> Connection
def set_connection_callbacks: (Connection connection, Array[Connection] connections, Options options) -> void
def build_altsvc_connection: (Connection existing_connection, Array[Connection] connections, URI::Generic alt_origin, String origin, Hash[String, String] alt_params, Options options) -> Connection?
def build_requests: (verb, uri, options) -> Array[Request]
| (Array[[verb, uri, options]], options) -> Array[Request]
| (Array[[verb, uri]], options) -> Array[Request]
| (verb, _Each[[uri, options]], Options) -> Array[Request]
| (verb, _Each[uri], options) -> Array[Request]
def build_connection: (URI::HTTP | URI::HTTP uri, Options options) -> Connection
def init_connection: (String type, URI::HTTP | URI::HTTP uri, Options options) -> Connection
def send_requests: (*Request) -> Array[response]
def _send_requests: (Array[Request] requests) -> Array[Connection]
def receive_requests: (Array[Request] requests, Array[Connection] connections) -> Array[response]
attr_reader self.default_options: Options
end
OriginalSession: singleton(Session)
end