I had tried various methods for this but i didn't get this one, can anyone give proper solution for this? Actually, I know how to call web service by using ajax calls, but whenever I tried to pass my url as below, it gives me error,
onInit: function() {
$.ajax({
url:"http://SERVER_IP/SAP_DEMO/register.php",
type: "POST",
datatype:"json",
accepts:{ text:"application/json" },
success: function(oResData){
if(!oResData) {
sap.m.MessageToast.show("No Success"); }
else{ sap.m.MessageToast.show(" Success"); } },
error: function(){ sap.m.MessageToast.show("unsuccessful json call"); } });
var oModel=new sap.ui.model.json.JSONModel();
sap.ui.getCore().setModel(oModel); }
The above code gives me error:
error: Fiori Architectural guidelines: ESLint(sap-no-hardcoded-url): Hardcoded (non relative) url found.
Kindly suggest me.....