I am trying to call a rest service using ajax in SharePoint online list form by adding a web part. Here is the code attached. SharePoint is https where as my java rest service is http. I am confused how to get a response. When I debugged it says content media blocked!. Please help me with this.
$.ajax({
url:"http://54.227.190.149:8080/crew-dashboard-rest-services-0.0.1/aircraftView",
type: "POST",
contentType: "application/json; charset=utf-8",
async: false , dataType: "json",
data: JSON.stringify(item),
success: function (result) {
alert("success");
},
error: function (xhr, textStatus, error) {
alert("error");
}
});