Code example for BasicCookieStore

0
	private void setupHttpIO() { 
		Log.d("Communicator","Instanciating HTTP Client");		
		httpIO = AndroidHttpClient.newInstance(USER_AGENT);
		if(this.cookies == null) {
			// Setup a cookie store for the httpContext, so we don't have to care about them 
			this.cookies = new BasicCookieStore();
			this.httpContext = new BasicHttpContext();
			 
			this.httpContext.setAttribute(ClientContext.COOKIE_STORE, this.cookies);
		} 
 
	} 
	 
	public void resetState() { 
		Log.d("Communicator","Resetting state");
		 
		this.loggedIn = false;
		this.persistentGETParams.clear();
		this.setState(VirtuOhmState.LOGIN_PAGE);
		if(this.cookies != null) {
			this.cookies.clear();