httpx/sig/callbacks.rbs
HoneyryderChuck 7a60346bf7 Added trailer header support for writing requests
Request can also add their own trailer headers, either explicitly via
Request#trailers , or via request lifecycle callbacks
2021-05-06 10:38:20 +01:00

15 lines
397 B
Plaintext

module HTTPX
interface _Callable
def call: (*untyped) -> void
end
module Callbacks
def on: (Symbol) { (*untyped) -> void } -> void
def once: (Symbol) { (*untyped) -> void } -> void
def emit: (Symbol, *untyped) -> void
def callbacks_for?: (Symbol) -> bool
def callbacks: () -> Hash[Symbol, Array[_Callable]]
| (Symbol) -> Array[_Callable]
end
end