Commit 5d0131e65f14d0507a02aa12e1f4d6b72f3956f3

Authored by Andrew
1 parent ff407187

Updated curl command for ES6 [skip ci]

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/query.rb
... ... @@ -98,7 +98,7 @@ module Searchkick
98 98 # no easy way to tell which host the client will use
99 99 host = Searchkick.client.transport.hosts.first
100 100 credentials = host[:user] || host[:password] ? "#{host[:user]}:#{host[:password]}@" : nil
101   - "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}'"
  101 + "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}'"
102 102 end
103 103  
104 104 def handle_response(response)
... ...