如何在Elasticsearch中将CURL转换为URI

时间:2016-01-11 06:55:00

标签: html curl browser elasticsearch uri

我有一个弹性搜索聚合的curl命令,如下所示。

 driver.switchTo.window(parentWindow);

我想在浏览器中将这些卷曲搜索到我的htmlpage中,如何将其转换为普通网址,例如elasticsearch中的URI搜索?

请帮我将上面的内容转换为网址?

1 个答案:

答案 0 :(得分:3)

您可以使用https://github.com/JangoSteve/remotipart直接在网址中传递正文

def create_post
  @post = Post.new(:club => params[:club],:venue => params[:Venue], :title => params[:title] , :shortdesc => params[:shortdesc],:longdesc => params[:longdesc] ,:category => params[:category],:eventdatetime => params[:eventdatetime],:video1 => params[:video1],:file1 => params[:file1],:file2 => params[:file2],:file3 => params[:file3])
  @post.image1 = params[:image1]
  if @post.save
    render json: {post: @post, error: false}
  else
    render json: {error: true}
  end
end