httpx/sig/httpx.rbs
HoneyryderChuck 1241586eb4 introducing subplugins to plugins
subplugins are modules of plugins which register as post-plugins of other plugins

a specific plugin may want to have a side-effect on the functionality of another plugin, so they can use this to register it when the other plugin is loaded
2025-04-04 09:25:53 +01:00

27 lines
577 B
Plaintext

module HTTPX
extend Chainable
EMPTY: Array[untyped]
EMPTY_HASH: Hash[untyped, untyped]
VERSION: String
type http_uri = URI::HTTP | URI::HTTPS
type uri = http_uri | string
type generic_uri = String | URI::Generic
type verb = String
type request_params = Hash[Symbol, untyped]
type ip_family = Integer #Socket::AF_INET6 | Socket::AF_INET
module Plugins
self.@plugins: Hash[Symbol, Module]
self.@plugins_mutex: Thread::Mutex
def self?.load_plugin: (Symbol name) -> Module
def self?.register_plugin: (Symbol, Module) -> void
end
end