I make a JSONP request using MooTools:
var username = 'hsz';
var password = 'pass';
var req = new Request.JSONP({
url: 'http://api.blip.pl/profile.json',
method: 'get',
headers: {
'Authorization' : 'Basic ' + Base64.encode(username + ':' + password),
'Accept' : 'application/json',
'Content-Type' : 'application/json',
'X-blip-api' : '0.02'
},
onSuccess: function(res){ alert('success'); },
onFailure: function(res){ alert('failure'); }
}).send();
With valid login and password it works fine (alerts me success
).
When I change password
to an invalid value it does not do anything.
I do not know why it behaves badly.
Same thing when I use Request.JSON()
.
Any ideas ?