From 5d0131e65f14d0507a02aa12e1f4d6b72f3956f3 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 14 Feb 2018 21:43:59 -0800 Subject: [PATCH] Updated curl command for ES6 [skip ci] --- lib/searchkick/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchkick/query.rb b/lib/searchkick/query.rb index 9b24c3d..3a381aa 100644 --- a/lib/searchkick/query.rb +++ b/lib/searchkick/query.rb @@ -98,7 +98,7 @@ module Searchkick # no easy way to tell which host the client will use host = Searchkick.client.transport.hosts.first credentials = host[:user] || host[:password] ? "#{host[:user]}:#{host[:password]}@" : nil - "curl #{host[:protocol]}://#{credentials}#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -d '#{query[:body].to_json}'" + "curl #{host[:protocol]}://#{credentials}#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -H 'Content-Type: application/json' -d '#{query[:body].to_json}'" end def handle_response(response) -- libgit2 0.21.0