// 旧版 HttpClient httpClient = new DefaultHttpClient(); // execute get/post/put or whatever httpClient.doGetPostPutOrWhatever(); // get cookieStore CookieStore cookieStore = httpClient.getCookieStore(); // get Cookies List<Cookie> cookies = cookieSto
cookies session均为key---value的形式展示, 1. session是存储在服务端,并有一块区域控件存储用户信息,主要是为了判断该用户是否登录,在客户端采用httpClient/HttpUrlConnection进行登录请求的时候,传过去的username=“ccc” 服务端中的session进行判断是否存在改sessionId,以及value,不存在代表改用户不曾登录,服务器会自动生成唯一的sessionId其为key,传过来的ccc则为value,key="
Example 1: HttpClient httpClient = new HttpClient(); httpClient.getHostConfiguration().setHost("mail.qq.com"); HttpMethod http = new PostMethod("http://m537.mail.qq.com/cgi-bin/frame_html?sid=oYV8g1dfxab5VH