Code example for DefaultHttpClient

Methods: getCookieStore

		Scheme scheme = new Scheme("https", socketFactory, 443);
	public Serializable getSerializableCookie(int index){
		return new SerializableCookie(this.httpClient.getCookieStore().getCookies().get(index));
	public void addCookie(Cookie cookie){
	// Return array: index(0) -> endpointUrl (if redirected) 
	//				 index(1) -> get response 
	public String[] httpGetWithEndpoint(String url) throws IOException{
		HttpGet httpget = new HttpGet(url);
		HttpContext context = new BasicHttpContext(); 
		HttpResponse response = httpClient.execute(httpget, context); 
		String responseAsStr = readResponse(response.getEntity().getContent()).toString();
Connect your IDE to all the code out there  Get Codota for Java