Frage

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");
                }
            });
War es hilfreich?

Lösung

You are trying to call unsecured web service in a secured website that called a Mix Content.

Unfortunately, this doesn't work!! you will need to call a secure HTTPS web service to get it working as expected!

As a temporary workaround, try to enable Mixed Content in your browser that may work!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top