I have created Restful web service in jomsocial environment. It\'s on the local machine. When I test it using REST console it return\'s response.
local url formed is...<
After lot of search finally I found solution to this issue. :)
Instead of localhost need to use 10.0.2.2 this network address coz android emulator doesn't recognize localhost refer this
Now at least success callback is called
ajax call is..
$.ajax({
type: "POST",
url: "http://10.0.2.2:5454/kisan-06/index.php?option=com_api&format=raw&app=users&resource=login&key=dfd8a84f8cdce807ae1d30a838415ea37eaa075c",
data: {username: 'sai.kiks2@gmail.com', password: '123456'},
success: function(data, textStatus, jqXHR) {
alert("in success");
},
error: function(jqXHR, textStatus, errorThrown){
alert("There was an error loggin in");
}
});
But now I am facing another problem...
How to access data returned in success callback?