Original Article: http://brainflush.wordpress.com/2008/10/17/talking-to-web-servers-via-http-in-android-10/ HttpClient httpClient = new DefaultHttpClient(); StringBuilder uriBuilder = new StringBuilder(SERVICE_ENDPOINT); uriBuilder.append(“?param0=” + param0); uriBuilder.append(“¶m1=” + param1); uriBuilder.append(“¶mN=” + paramN); HttpGet request = new HttpGet(uriBuilder.toString()); HttpResponse response = httpClient.execute(request); int status = response.getStatusLine().getStatusCode(); // we assume that the response body contains the error message if (status != HttpStatus.SC_OK) { ByteArrayOutputStream ostream = new…
Tag: entity-addpart-double
Https returns 404 with DefaultHttpClient on Android?
Reference: http://stackoverflow.com/questions/3730760/https-returns-404-with-defaulthttpclient-on-android I have an http request that worked as http://blah.com and now I have been asked to usehttps://blah.com The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client? Answer Https almost always implies a different port being used (standard http=>80; standard https=>443)….