Code example for ClientProtocolException

Methods: printStackTrace

0
			try { 
				HttpGet http_get = new HttpGet(urls[0]);
				return http_client.execute(http_get);
			} catch (ClientProtocolException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} 
			return null; 
		} 
		 
		protected void onPostExecute(HttpResponse result) {
			try { 
				BufferedReader reader = new BufferedReader(new InputStreamReader(result.getEntity().getContent()));
				String first_line = reader.readLine();
				Toast.makeText(getApplicationContext(), first_line, Toast.LENGTH_LONG).show();				
			} catch (IllegalStateException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();