Module: HTTPX::Plugins::Stream::OptionsMethods
- Defined in:
- lib/httpx/plugins/stream.rb
Overview
adds support for the following options:
- :stream
-
whether the request to process should be handled as a stream (defaults to
false). - :stream_response_class
-
Class used to build the stream response object.
Instance Method Summary collapse
- #extend_with_plugin_classes(pl) ⇒ Object
- #option_stream(val) ⇒ Object
- #option_stream_response_class(value) ⇒ Object
Instance Method Details
#extend_with_plugin_classes(pl) ⇒ Object
147 148 149 150 151 152 153 154 155 |
# File 'lib/httpx/plugins/stream.rb', line 147 def extend_with_plugin_classes(pl) return super unless defined?(pl::StreamResponseMethods) @stream_response_class = @stream_response_class.dup Options::SET_TEMPORARY_NAME[@stream_response_class, pl] @stream_response_class.__send__(:include, pl::StreamResponseMethods) if defined?(pl::StreamResponseMethods) super end |
#option_stream(val) ⇒ Object
139 140 141 |
# File 'lib/httpx/plugins/stream.rb', line 139 def option_stream(val) val end |
#option_stream_response_class(value) ⇒ Object
143 144 145 |
# File 'lib/httpx/plugins/stream.rb', line 143 def option_stream_response_class(value) value end |