class Elasticsearch::Transport::Transport::Response

Wraps the response from Elasticsearch.

Attributes

body[R]
headers[R]
status[R]

Public Class Methods

new(status, body, headers={}) click to toggle source

@param status [Integer] Response status code @param body [String] Response body @param headers [Hash] Response headers

# File lib/elasticsearch/transport/transport/response.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