Elastic Search (ES) にクエリを実行し、結果をファイルに保存するページを作成します。JQuery.post を使用してクエリを送信しようとすると、エラー {"error": "Please use POST request"} が表示されます
$(document).ready(function(){
alert("ready!");
$("#go").click(function(event) {
alert("go!");
/* get some values from elements on the page: */
url=$("#host").val();
alert(url);
q=$("#q").val();
alert(q);
var posting = $.post( url, { data: q } );
/* Put the results in a div */
posting.done(function( data ) {
alert(data);
// var content = $( data ).find( '#content' );
// $( "#result" ).empty().append( content );
alert("done!");
});
});
});