Android HttpRequest class (version 2.1)

Version of of this class had some bugs so I corrected them and here is the latest version 🙂


You will also need the class below:

HTTP Request class for Android

Here is a class that can be used to make HTTP get and HTTP post requests. I haven’t commented everything but the usage should be pretty clear from the method signatures.

Note: This is for Android 1.5.

You will also need this class along with it.

  1. import java.util.Hashtable;
  3. public class HttpData {
  4.     public String content;
  5.     public Hashtable<String, String> cookies = new Hashtable<String, String>();
  6.     public Hashtable<String, String> headers = new Hashtable<String, String>();
  7. }

Android 1.5 SDK Released !

Google has released Android 1.5 SDK. This release is based on the cupcake branch in Android’s repository. Cupcake was a modified version of the SDK written by a group of independent developers and functioned better than the 1.0 SDK. Android 1.5 SDK also has other enchancements like a better profiler. For a list of all changes and enhancements, please visit: