Sha256: 28a09cea872be2e8ab23d5aa49950fd7ec97205e62ce7bca5d264918a775a5de

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

module HTTPX
  module Plugins
    module Callbacks
      class CallbackError < Exception
      end

      module InstanceMethods
        include HTTPX::Callbacks

        type socket = TCPSocket | 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

5 entries across 5 versions & 1 rubygems

Version Path
httpx-1.2.4 sig/plugins/callbacks.rbs
httpx-1.2.3 sig/plugins/callbacks.rbs
httpx-1.2.2 sig/plugins/callbacks.rbs
httpx-1.2.1 sig/plugins/callbacks.rbs
httpx-1.2.0 sig/plugins/callbacks.rbs