Sha256: caab7b39cd4e6e92c147a177312e3c29bb4548cb585b9c6976b0056f237f3bc9

Contents?: true

Size: 535 Bytes

Versions: 16

Compression:

Stored size: 535 Bytes

Contents

module HTTP
  class Response
    class Streamer
      def initialize(str)
        @io = StringIO.new str
      end

      def readpartial(size = nil)
        unless size
          if defined?(HTTP::Client::BUFFER_SIZE)
            size = HTTP::Client::BUFFER_SIZE
          elsif defined?(HTTP::Connection::BUFFER_SIZE)
            size = HTTP::Connection::BUFFER_SIZE
          end
        end

        @io.read size
      end

      def close
        @io.close
      end

      def sequence_id
        -1
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/webmock-3.6.0/lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.7.2 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.7.1 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.7.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.6.2 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.6.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.5.1 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.5.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.4.2 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.4.1 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.4.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.3.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.2.1 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.2.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.1.1 lib/webmock/http_lib_adapters/http_rb/streamer.rb
webmock-3.1.0 lib/webmock/http_lib_adapters/http_rb/streamer.rb