try this
HttpPost httppost;
HttpClient httpclient;
List<NameValuePair> nameValuePairs;
String userInfo[] = getUserInfo();
String uname = userInfo[0];
String pass = userInfo[1];
if(uname != null && pass != null) {
String bytesSent;
httppost = new HttpPost(getURL());
httpclient = new DefaultHttpClient();
nameValuePairs = new ArrayList<NameValuePair>(2);
String reminderstatus = "P";
nameValuePairs.add(new BasicNameValuePair("doAction", "something"));
nameValuePairs.add(new BasicNameValuePair("username",uname));
nameValuePairs.add(new BasicNameValuePair("password", pass));
try {
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
InputStream is = response.getEntity().getContent();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(20);
int current = 0;
while((current = bis.read()) != -1) {
baf.append((byte)current);
}
bytesSent = new String(baf.toByteArray());
}
}