I try to sent online request to get some data.
This is what I sent:
This is how I send it:
This is what I sent:
I've got a responce:type="extra" id="password">Xxxxx</DATA><DATA type="email">mycustomer@aol.com</DATA></DATASET>
If I use this string on IE, it return my data without a problem.<DATASET><TYPE>error</TYPE><DATA>Invalid DATASET</DATA></DATASET>
This is how I send it:
What am I doing wrong?URL url = new URL(sQry);
HttpURLConnection urlConn;
DataOutputStream printout;
BufferedReader input;
urlConn =(HttpURLConnection)url.openConnection();
urlConn.setDoInput(true);
urlConn.setDoOutput(true);
urlConn.setUseCaches(true);
System.out.println("Qry ==>\n" + sQry);
input = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
String resp = null;
while( null != ((resp = input.readLine())))
sResponse = resp;
input.close ();