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
126 def self.extra_options(options)
127   options.merge(
128     stream: false,
129     timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 },
130     stream_response_class: Class.new(StreamResponse, &Options::SET_TEMPORARY_NAME).freeze
131   )
132 end