Code example for DefaultHttpClient

Methods: execute, getParams

0
	 * @see gov.nasa.arc.geocam.talk.service.ISiteAuth#logoutAndUnregister() 
	 */ 
	@Override 
	public void logoutAndUnregister()throws AuthenticationFailedException, ClientProtocolException, IOException 
	{ 
		httpClient = new DefaultHttpClient();
		 
		HttpGet g = new HttpGet(serverRootUrl + "/" + appPath + "/" + "unregister");
		httpClient.execute(g);
		 
		httpClient = new DefaultHttpClient();
		 
		HttpParams params = httpClient.getParams();
		HttpClientParams.setRedirecting(params, false);
 
		HttpPost p = new HttpPost(serverRootUrl + "/accounts/logout/");
		p.setParams(params);
 
		List<BasicNameValuePair> nameValuePairs = new ArrayList<BasicNameValuePair>();
		nameValuePairs.add(new BasicNameValuePair("username", username));
		nameValuePairs.add(new BasicNameValuePair("password", password));