I'm attempting to POST data Jersey using the following..
the POST being made
var details = {'username': username, 'password': password};
$.POST('login', details,function(result){
console.log(result);
},"json");
The receiving method
@POST
public Viewable HeyStaksLogin(LoginInfo loginI){
String uname = loginI.username;
String pword = loginI.password;
System.out.println("username = ");
}
The loginInfo class
@XmlRootElement
public class LoginInfo {
public String username;
public String password;
}
however, I'm getting a TypeError saying undefined method back. Why is this
happening? How can I POST my data using JQuery?