HTTPclient Get Post requests

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

HTTPclient Get Post requests

Postby opy001 » Fri Nov 12, 2010 4:24 pm

I am so glad I found this! I have been looking for a good tutorial for a while. This is more of a code givaway then a tut but it is easy to understand and does a great job.

http://www.newtondev.com/2010/07/27/mak ... e-android/

There is one mistake though, in this section here:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     private static HttpClient getHttpClient() {
  2.         if (mHttpClient == null) {
  3.             mHttpClient = new DefaultHttpClient();
  4.             final HttpParams params = client.getParams();
  5.             HttpConnectionParams.setConnectionTimeout(params, HTTP_TIMEOUT);
  6.             HttpConnectionParams.setSoTimeout(params, HTTP_TIMEOUT);
  7.             ConnManagerParams.setTimeout(params, HTTP_TIMEOUT);
  8.         }
  9.         return mHttpClient;
  10.     }
  11.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


You have to add this line:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. HttpClient client = getHttpClient();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
opy001
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Sun Jul 11, 2010 5:24 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests