我正在尝试连接到drupal服务器.我以前能够做到这一点,但drupal开发人员现在要求我添加另一个cookie.服务器没有注册我尝试在下面发送的cookie.谁能明白为什么?
public static void maybeCreateHttpClient() { if (mHttpClient == null) { mHttpClient = new DefaultHttpClient(); final HttpParams params = mHttpClient.getParams(); HttpConnectionParams.setConnectionTimeout(params,REGISTRATION_TIMEOUT); HttpConnectionParams.setSoTimeout(params,REGISTRATION_TIMEOUT); ConnManagerParams.setTimeout(params,REGISTRATION_TIMEOUT); BasicCookieStore cookieStore = new BasicCookieStore(); ClientCookie cookie = new BasicClientCookie("aml",key); cookieStore.addCookie(cookie); localContext = new BasicHttpContext(); localContext.setAttribute(ClientContext.COOKIE_STORE,cookieStore); } }