Hi,
I've read most of the articles about post problem but i could not find any solution for my problem. The code at the below works on Non-Nokia physical devices (Sony-EricssonT616..) and Nokia emulators without a problem. But on physical Nokia device (i've tried on 1100,3100) it did not work. Does anyone has any idea. I am stuck, help me out please.!
c = (HttpConnection)Connector.open(url, Connector.READ_WRITE);
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("CONTENT-TYPE","application/x-www-form-urlencoded");
c.setRequestProperty("Accept","application/octet-stream");
c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Language", "en-US");
os = c.openOutputStream();
byte postmsg[] = str.getBytes();
for(int i=0;i<postmsg.length;i++) {
os.write(postmsg[i]);
}
is = c.openDataInputStream();
int ch;
while ((ch = is.read()) != -1) {
b.append((char) ch);
}
thanks for your help..
Regards..

Reply With Quote


