我正在尝试这个
HttpClient httpClient = new DefaultHttpClient();
CookieStore cookieStore = httpClient.getCookieStore();
List<Cookie> cookies = cookieStore.getCookies();
但我无法访问getCookieStore()。它只是在httpClient上不存在。可用的ony获取
httpClient.getClass()
httpClient.getConnectionManager()
httpClient.getParams()
别无其他。
我增加了api级别,但仍然无法正常工作。不确定我需要做什么才能访问从客户端返回的cookie?
答案 0 :(得分:1)
我将HttpClient更改为DefaultHttpClient。即我来自
HttpClient httpClient = new DefaultHttpClient()
到
DefaultHttpClient httpClient = new DefaultHttpClient();