4
Because of the CORS restriction, you cannot make a request ajax
common.
In this case, to circumvent this problem, you can use a JSONP.
In that case, I’ll illustrate with the JSONP
jQuery.
var url = 'https://client-demo-accounts-2.bootstrap.fyre.co/bs3/v3.1/client-demo-accounts-2.fyre.co/379221/MjAxNjAxMjcxMjQyOmRlc2lnbmVyLWFwcC0xNDUzODQwMjgxODk0/init';
$.ajax({
url: url,
dataType: "jsonp",
success: function (response) {
console.log(response);
}
});
I tested it in the given url and it perfectly accepted the use of JSONP
.
If you will use only
JavaScript
see the answers of that pegunta.– Pedro Camara Junior
Important to read What is JSONP and how it works?
– Wallace Maxters