mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
30 lines
683 B
Plaintext
30 lines
683 B
Plaintext
module HTTPX
|
|
module Plugins
|
|
module Upgrade
|
|
interface _Upgrader
|
|
def call: (Connection connection, Request request, Response response) -> void
|
|
end
|
|
|
|
def self.configure: (singleton(Session)) -> void
|
|
|
|
interface _UpgradeOptions
|
|
def upgrade_handlers: () -> Hash[String, _Upgrader]
|
|
end
|
|
|
|
def self.extra_options: (Options) -> (Options & _UpgradeOptions)
|
|
|
|
module InstanceMethods
|
|
end
|
|
|
|
module ConnectionMethods
|
|
attr_reader upgrade_protocol: String?
|
|
attr_reader hijacked: boolish
|
|
|
|
def hijack_io: () -> void
|
|
end
|
|
end
|
|
|
|
type sessionUpgrade = Session & Upgrade::InstanceMethods
|
|
end
|
|
end
|