I am using jQuery for sending HTTP request. Below is the code. I want to get the status code of HTTP request.
Does anyone know, how to get the status?
$(document).ready(function(){
var url="http://www.google.com";
$.get(url, function(data,status) {
alert(status);
// This doesn't alert me status
// I want to alert request status code as "200" i.e. ok
});
// on Failure also need the status code of this request.
});
Update
Working Example