Im currently trying to figure out what process to follow in terms of posting data from my browser using JavaScript to a Java application.
JavaScript Post function
 xhr = new XMLHttpRequest();
 var url = "http://localhost:9200/test/mytest";
 xhr.open("POST", url, true);
 xhr.setRequestHeader("Content-type", "application/json");
 var data = JSON.stringify({"test" : testdata123});
 xhr.send(data);
I would like to consume the above Json data in a java application using rest. How do i go about setting this up?
 
     
    