Exception: SSE::Errors::HTTPContentTypeError
- Inherits:
-
StandardError
- Object
- StandardError
- SSE::Errors::HTTPContentTypeError
- Defined in:
- lib/ld-eventsource/errors.rb
Overview
An exception class representing an invalid HTTP content type. This can be passed to the error handler specified in Client#on_error.
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
The HTTP content type.
Instance Method Summary collapse
-
#initialize(type) ⇒ HTTPContentTypeError
constructor
A new instance of HTTPContentTypeError.
Constructor Details
#initialize(type) ⇒ HTTPContentTypeError
Returns a new instance of HTTPContentTypeError.
32 33 34 35 |
# File 'lib/ld-eventsource/errors.rb', line 32 def initialize(type) @content_type = type super("invalid content type \"#{type}\"") end |
Instance Attribute Details
#type ⇒ String (readonly)
The HTTP content type.
39 40 41 |
# File 'lib/ld-eventsource/errors.rb', line 39 def type @type end |