i have this code.
var txt = "username=admin&password=admin";
var jsonText = JSON.stringify({username:'test', password:'test'});
$.ajax( {
url : 'http://localhost/testService/loadpayments/',
type: "GET",
contentType: "application/json; charset=utf-8",
data:jsonText,
dataType: "json",
processdata:false,
error : function(result) {
$('#items').html(result);
},
success : function(model) {
$("#items").html(model);
}
});
Now, when i run it in firefox and looking at it on the console it says incorrect username and password yet i correctly supplied both. also when i try to paste the url with the username and password( both correctly supplied ) it runs and returns gracefully. Am i doing it right? I'm relatively new to this kind of stuff. THANK YOU.