2012-12-15 58 views
0

訪問cookie存儲我想這無法從Android的

HttpClient httpClient = new DefaultHttpClient(); 

CookieStore cookieStore = httpClient.getCookieStore(); 

List<Cookie> cookies = cookieStore.getCookies(); 

但我不能訪問getCookieStore()。它只是在httpClient上不存在。 ony得到的是可用的是

httpClient.getClass() 
httpClient.getConnectionManager() 
httpClient.getParams() 

沒什麼別的。 我增加了我的API水平,但仍然沒有奏效。不知道我需要做什麼才能訪問客戶端返回的Cookie?

回答

1

我將HttpClient更改爲DefaultHttpClient。即,我從

HttpClient httpClient = new DefaultHttpClient() 

DefaultHttpClient httpClient = new DefaultHttpClient();