I am trying to execute bing map REST API using JQuery AJAX method. The Rest URL shows correct results in browser. But when I execute same URL using AJAX method of JQuery it seems to be not working and I am getting following exception:
"Netowrk error: failed to execute send on xmlhttprequest"
Here is my code:
$.ajax({
type: 'GET',
async: false,
dataType: 'text',
url: 'http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?includeEntityTypes=Address&includeNeighborhood=0&include=ciso2&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
success: function (result) {
alert("working");
},
error: function (xhr, ajaxOptions, thrownError, request, error) {
alert('xrs.status = ' + xhr.status + '\n' +
'thrown error = ' + thrownError + '\n' +
'xhr.statusText = ' + xhr.statusText + '\n' +
'request = ' + request + '\n' +
'error = ' + error);
}
});
When I open the same URL in browser I can see the result in JSON format.
Please help!!!