Class: LogStash::ElasticsearchClient::Response
- Inherits:
-
Object
- Object
- LogStash::ElasticsearchClient::Response
- Defined in:
- lib/logstash/elasticsearch_client.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL.
-
#headers ⇒ Object
readonly
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL.
-
#status ⇒ Object
readonly
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL.
Instance Method Summary collapse
-
#initialize(status, body, headers = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status, body, headers = {}) ⇒ Response
Returns a new instance of Response.
13 14 15 16 |
# File 'lib/logstash/elasticsearch_client.rb', line 13 def initialize(status, body, headers={}) @status, @body, @headers = status, body, headers @body = body.force_encoding('UTF-8') if body.respond_to?(:force_encoding) end |
Instance Attribute Details
#body ⇒ Object (readonly)
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL
12 13 14 |
# File 'lib/logstash/elasticsearch_client.rb', line 12 def body @body end |
#headers ⇒ Object (readonly)
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL
12 13 14 |
# File 'lib/logstash/elasticsearch_client.rb', line 12 def headers @headers end |
#status ⇒ Object (readonly)
duplicated here from Elasticsearch::Transport::Transport::Response to create a normalised response across different client IMPL
12 13 14 |
# File 'lib/logstash/elasticsearch_client.rb', line 12 def status @status end |