YQL ESV API Example
Retrieve data and display it with jQuery and YQL
HTML
<input type="button" value="get data" id="btn">
JavaScript
$("#btn").click(function () {
$.ajax({
url: 'https://lab9.o.com.br:8/test-cors',
type: "GET",
dataType: "json",
xhrFields: {
withCredentials: false
},
crossDomain: true,
success: function (data) {
alert(data.msg);
console.log(data.msg);
}
});
});