Class: LogStash::ElasticsearchClient::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/elasticsearch_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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

#headersObject (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

#statusObject (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