Module: HTTPX::Plugins::ServerSentEvents
- Defined in:
- lib/httpx/plugins/server_sent_events.rb
Overview
This plugin implements convenience methods for Server Sent Events streams.
Defined Under Namespace
Modules: InstanceMethods, OptionsMethods, RequestMethods, ServerSentEventsRetries, StreamResponseMethods
Constant Summary collapse
- Message =
rubocop:disable Naming/ConstantName
if RUBY_VERSION >= "3.2.0" # rubocop:disable Naming/ConstantName Data.define(:data, :event, :id, :retry_after) do def initialize(event: nil, id: nil, retry_after: nil, **kwargs) super end end else Struct.new(:data, :event, :id, :retry_after, keyword_init: true) end
Class Method Summary collapse
Class Method Details
.load_dependencies(klass) ⇒ Object
28 29 30 |
# File 'lib/httpx/plugins/server_sent_events.rb', line 28 def load_dependencies(klass) klass.plugin(:stream) end |
.subplugins ⇒ Object
22 23 24 25 26 |
# File 'lib/httpx/plugins/server_sent_events.rb', line 22 def subplugins { retries: ServerSentEventsRetries, } end |