Hi,
am using Xmlhttprequest javascript api for call the website api it return the value and show it in the crm. but it throw cross-origin read blocking (corb) blocked cross-origin response with mime type application/json . i don,t know how to solve this error. Here it is my code
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://*****+ pass, true );
xmlHttp.setRequestHeader('OData-MaxVersion', '4.0');
xmlHttp.setRequestHeader('OData-Version', '4.0');
xmlHttp.setRequestHeader('Accept', 'application/json');
xmlHttp.setRequestHeader( 'Access-Control-Allow-Origin', '*');
xmlHttp.setRequestHeader('Access-Control-Allow-Credentials', 'true');
xmlHttp.setRequestHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
xmlHttp.setRequestHeader( 'Content-Type', 'application/json', 'text/json' );
xmlHttp.setRequestHeader('Access-Control-Allow-Headers', 'Origin, Accept, Content-Type, Access-Control-Request-Method, X-Requested-With, X-Content-Type-Options, X-CSRF-Token');
xmlHttp.setRequestHeader('X-Content-Type-Options: nosniff');
xmlHttp.send();
var responseText = JSON.parse(xmlHttp.responseText);
var data = responseText.data;
// Xrm.Page.ui.setFormNotification("Password is :" data, "INFO");
alert(data);