Sha256: cd9fbfd2af5cbd9eda09796cc6f948bf9787ade51395bebba9e10a93f701e353

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

module HTTPX
  class StreamResponse
    include _ToS

    @request: Request & RequestMethods
    @session: sessionStream
    @on_chunk: ^(String) -> void | nil

    def each: () { (String) -> void } -> void
            | () -> Enumerable[String]

    def each_line: () { (String) -> void } -> void
                 | () -> Enumerable[String]

    def on_chunk: (string) -> void

    def initialize: (Request, Session) -> void

    private

    def response: () -> response
  end

  module Plugins
    module Stream
      module InstanceMethods
        private

        def request: (*Request, ?stream: bool, **untyped?) -> (response | Array[response] | StreamResponse)
                   | (*untyped, ?stream: bool, **untyped?) -> (response | Array[response] | StreamResponse)
      end

      module RequestMethods
        attr_accessor stream: StreamResponse?
      end

      module ResponseMethods
        def stream: () -> StreamResponse?
      end

    end

    type sessionStream = Session & Stream::InstanceMethods
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
httpx-1.1.4 sig/plugins/stream.rbs