Code example for DefaultHttpClient

Methods: getCookieStore

0
		Scheme scheme = new Scheme("https", socketFactory, 443);
		httpClient.getConnectionManager().getSchemeRegistry().register(scheme);
	} 
	 
	public Serializable getSerializableCookie(int index){
		return new SerializableCookie(this.httpClient.getCookieStore().getCookies().get(index));
	} 
	 
	public void addCookie(Cookie cookie){
		this.httpClient.getCookieStore().addCookie(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();
		if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK){