jquery call rest service with parameters code example
Example: jquery ajax endpoint
$.ajax({
type:"GET/POST",
url: "target url",
data: "var1=" + data1,
success: function(msg){
$("#targethtml").html(msg)
},
error: function(errormsg){
console.log(errormsg)
}
});