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-6.0.2 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-6.0.1 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-6.0.0 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.1.3 lib/elasticsearch/transport/transport/response.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/response.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/response.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.4 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-2.0.2 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.3 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.2 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.1 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-2.0.1 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.1.2 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.0 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-5.0.0.pre lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-2.0.0 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.1.0 lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-2.0.0.pre lib/elasticsearch/transport/transport/response.rb
elasticsearch-transport-1.1.pre lib/elasticsearch/transport/transport/response.rb