sig/session.rbs in httpx-0.15.4 vs sig/session.rbs in httpx-0.16.0

- old
+ new

@@ -1,53 +1,58 @@ module HTTPX class Session include Loggable include Chainable + EMPTY_HASH: Hash[untyped, untyped] + @options: Options - @responses: Hash[Request, Response] - @persistent: bool + @responses: Hash[Request, response] + @persistent: bool? def wrap: () { (instance) -> void } -> void - | () -> void + def close: (*untyped) -> void def request: (*Request, **untyped) -> (response | Array[response]) | (*untyped, **untyped) -> (response | Array[response]) - def build_request: (String | verb, uri, ?options) -> Request + def build_request: (String | verb, generic_uri, ?options) -> Request - def self.plugin: (Symbol | Module, ?options) { (Class) -> void } -> singleton(Session) - | (Symbol | Module, ?options) -> singleton(Session) + # def self.plugin: (Symbol | Module, ?options) { (Class) -> void } -> singleton(Session) + # | (Symbol | Module, ?options) -> singleton(Session) def self.default_options: -> Options private - def initialize: (?options?) { (instance) -> void } -> untyped - | (?options?) -> untyped + def initialize: (?options) { (instance) -> void } -> untyped + | (?options) -> untyped def pool: -> Pool def on_response: (Request, response) -> void def on_promise: (untyped, untyped) -> void - def fetch_response: (Request, *untyped) -> response? + def fetch_response: (Request request, untyped, untyped) -> response? + + def find_connection: (Request, Array[Connection] connections, Options options) -> Connection + def set_connection_callbacks: (Connection, Array[Connection], Options) -> void - def build_altsvc_connection: (Connection, Array[Connection], URI, String, Hash[String, String], Options) -> Connection? + def build_altsvc_connection: (Connection, Array[Connection], URI::Generic, String, Hash[String, String], Options) -> Connection? def build_requests: (verb | string, uri, options) -> Array[Request] | (Array[[verb | string, uri, options]], options) -> Array[Request] | (Array[[verb | string, uri]], options) -> Array[Request] - | (verb | string, _Each[[uri, options], void], Options) -> Array[Request] - | (verb | string, _Each[uri, void], options) -> Array[Request] + | (verb | string, _Each[[uri, options]], Options) -> Array[Request] + | (verb | string, _Each[uri], options) -> Array[Request] - def build_connection: (URI, Options) -> Connection + def build_connection: (URI::Generic, Options) -> Connection def send_requests: (*Request, options) -> Array[response] - def _send_requests: (Array[Request], options) -> Array[Connection] + def _send_requests: (Array[Request], Options) -> Array[Connection] def receive_requests: (Array[Request], Array[Connection], options) -> Array[response] end end \ No newline at end of file