Code example for AndroidHttpClient

Methods: execute

0
			try { 
				request.setHeader("Accept", "application/json");
				request.setHeader("Accept-Encoding", "gzip");
 
				final long t = System.currentTimeMillis();
				httpClient.execute(request, new ResponseHandler<Object>() {
 
					@Override 
					public Object handleResponse(HttpResponse response) {
 
						Logger.info("HTTPResponse received in ["
								+ (System.currentTimeMillis() - t) + "ms]");
 
						HttpEntity entity = response.getEntity();
						if (entity != null) {
							try { 
								InputStream instream = entity.getContent();
								Header contentEncoding = response
										.getFirstHeader("Content-Encoding");
								if (contentEncoding != null
										&& contentEncoding.getValue()