How to send JSON request parameters to server while submitting the form?
function fun2() {
alert("in fun2");
document.searchForm.action = "http://localhost:8080/DatasetRepo/rest/downloadZip?"+"{'datasets':['1'],'token':'myfirsttoken'}";
document.forms["searchForm"].submit();}
and its failing with Unsupported media type error.