module HTTPX::Plugins::Stream

  1. lib/httpx/plugins/stream.rb

This plugin adds support for streaming a response (useful for i.e. “text/event-stream” payloads).

gitlab.com/os85/httpx/wikis/Stream

Methods

Public Class

  1. extra_options

Constants

STREAM_REQUEST_OPTIONS = { timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 }.freeze }.freeze  

Public Class methods

extra_options(options)
[show source]
    # File lib/httpx/plugins/stream.rb
130 def self.extra_options(options)
131   options.merge(
132     stream: false,
133     timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 },
134     stream_response_class: Class.new(StreamResponse, &Options::SET_TEMPORARY_NAME).freeze
135   )
136 end