Sha256: 375cfe0fe4658d4eb9fd7706c398f8934b0d3383dd953f912d8f3dc3ee4a5bda

Contents?: true

Size: 1.17 KB

Versions: 6

Compression:

Stored size: 1.17 KB

Contents

module HTTPX
  module Plugins
    module Callbacks
      class CallbackError < Exception
      end

      module InstanceMethods
        include HTTPX::Callbacks

        type socket = TCPSocket | OpenSSL::SSL::SSLSocket | UNIXSocket

        def on_connection_opened: () { (http_uri origin, socket sock) -> void } -> self

        def on_connection_closed: () { (http_uri origin) -> void } -> self

        def on_request_error: () { (Request request, StandardError error) -> void } -> self

        def on_request_started: () { (Request request) -> void } -> self

        def on_request_body_chunk: () { (Request request, String chunk) -> void } -> self

        def on_request_completed: () { (Request request) -> void } -> self

        def on_response_started: () { (Request request, Response response) -> void } -> self

        def on_response_body_chunk: () { (Request request, Response response, String chunk) -> void } -> self

        def on_response_completed: () { (Request request, response response) -> void } -> self

        private

        def emit_or_callback_error: (*untyped) -> void
      end
    end

    type sessionCallbacks = Session & Callbacks::InstanceMethods
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
httpx-1.3.4 sig/plugins/callbacks.rbs
httpx-1.3.3 sig/plugins/callbacks.rbs
httpx-1.3.2 sig/plugins/callbacks.rbs
httpx-1.3.1 sig/plugins/callbacks.rbs
httpx-1.3.0 sig/plugins/callbacks.rbs
httpx-1.2.6 sig/plugins/callbacks.rbs