Code example for ClientProtocolException

Methods: toString

0
    		try{ 
    			ResponseHandler<String> responseHandler = new BasicResponseHandler();
    			return httpclient.execute(httppost,responseHandler);
    		 
    		} catch (ClientProtocolException e) {    			
    			Log.e("Error", e.toString());
    			//Return a string with error to indicate that an error has happened.  
    			return "error"; 
    		} 
	    } catch (Exception e) {
			Log.e("Error", e.toString());
			//Return a string with error to indicate that an error has happened.  
			return "error"; 
    	}	 
	} 
}