Commit 3dd0e0ff24cc1b814c444c4f1611d827acfa44e2

Authored by Andrew
1 parent 7f34e3bc

Updated curl commands for ES6 [skip ci]

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/searchkick/logging.rb
... ... @@ -167,7 +167,7 @@ module Searchkick
167 167  
168 168 # no easy way to tell which host the client will use
169 169 host = Searchkick.client.transport.hosts.first
170   - debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -d '#{payload[:query][:body].to_json}'"
  170 + debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -H 'Content-Type: application/json' -d '#{payload[:query][:body].to_json}'"
171 171 end
172 172  
173 173 def request(event)
... ... @@ -189,7 +189,7 @@ module Searchkick
189 189  
190 190 # no easy way to tell which host the client will use
191 191 host = Searchkick.client.transport.hosts.first
192   - debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/_msearch?pretty -d '#{payload[:body]}'"
  192 + debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/_msearch?pretty -H 'Content-Type: application/json' -d '#{payload[:body]}'"
193 193 end
194 194 end
195 195  
... ...