Sha256: 8887e0a5d6600efadd9207945135ab55763b8597ab7e7abac33251f8545b9778

Contents?: true

Size: 574 Bytes

Versions: 78

Compression:

Stored size: 574 Bytes

Contents

module Elasticsearch
  module Transport
    module Transport

      # Wraps the response from Elasticsearch.
      #
      class Response
        attr_reader :status, :body, :headers

        # @param status  [Integer] Response status code
        # @param body    [String]  Response body
        # @param headers [Hash]    Response headers
        def initialize(status, body, headers={})
          @status, @body, @headers = status, body, headers
          @body = body.force_encoding('UTF-8') if body.respond_to?(:force_encoding)
        end
      end

    end
  end
end

Version data entries

78 entries across 78 versions & 8 rubygems

Version Path
elasticsearch-transport-1.0.18 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.17 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.16 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.16.pre2 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.16.pre lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.15 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.14 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.13 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-sinneduy-1.0.12 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-pixlee-1.0.13 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.12 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.11 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.10 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.9 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.7 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.6 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.5 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.0.4 lib/elasticsearch/transport/transport/response.rb