This plugin implements convenience methods for Server Sent Events streams.
Classes and Modules
Constants
| Message | = | 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 |
Public Class methods
load_dependencies(klass)
[show source]
# File lib/httpx/plugins/server_sent_events.rb 28 def load_dependencies(klass) 29 klass.plugin(:stream) 30 end
subplugins()
[show source]
# File lib/httpx/plugins/server_sent_events.rb 22 def subplugins 23 { 24 retries: ServerSentEventsRetries, 25 } 26 end