Exception: SSE::Errors::HTTPContentTypeError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#typeString (readonly)

The HTTP content type.

Returns:

  • (String)


39
40
41
# File 'lib/ld-eventsource/errors.rb', line 39

def type
  @type
end