public void postLoginData() {
AsyncHttpClient myClient = new AsyncHttpClient();
RequestParams params1 = new RequestParams();
params1.put("username", "username");
params1.put("password", "pass");
myClient.post(
"https://68.164.136.217/htdocs/?action=login&returntype=JSON", //"https://68.164.136.217/htdocs/?action=login", //"http://192.168.2.148/htdocs/?action=login&returntype=JSON",
params1, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response) {
System.out.println("login success");
}
});
PersistentCookieStore myCookieStore = new PersistentCookieStore(this);
myClient.setCookieStore(myCookieStore);
Log.d("Cookies", myCookieStore.getCookies().toString());
}
http://pastebin.com/htDhQpKT 日志猫。我不知道为什么它给了我这个错误。我有互联网许可