Skip to content

Instantly share code, notes, and snippets.

View fsschmitt's full-sized avatar

Felipe Schmitt fsschmitt

View GitHub Profile
@fsschmitt
fsschmitt / gist:2906703
Created June 10, 2012 17:29
WebClient usage
String response = null;
HttpClient httpclient = null;
try {
HttpGet httpget = new HttpGet(url.toURI());
httpclient = new DefaultHttpClient();
HttpResponse httpResponse = httpclient.execute(httpget);
final int statusCode = httpResponse.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) {
throw new Exception("Got HTTP " + statusCode
I/APP (25083): I 06/06/2012 17:48:17:774 000061fb Undefined| Handlers have completed.
I/APP (25083): I 06/06/2012 17:48:17:778 000061fb RhodesApplication| New UiState: MainActivityCreated
I/APP (25083): I 06/06/2012 17:48:17:779 000061fb RhodesActivity| onStart
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb Undefined| Handlers have completed.
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb RhodesApplication| New UiState: MainActivityStarted
I/APP (25083): I 06/06/2012 17:48:17:780 000061fb RhodesActivity| onResume
I/APP (25083): I 06/06/2012 17:48:17:790 000061fb RhodesService| onCreate
I/APP (25083): I 06/06/2012 17:48:17:792 000061fb LocalFileProvider| Revoke URI permissions: content:///com.rhomobile.cmnavigomobile
I/APP (25083): I 06/06/2012 17:48:17:793 000061fb Rhodes| Loading...