tamdinh / microemu

Automatically exported from code.google.com/p/microemu
0 stars 0 forks source link

OutputStream acquired from HttpConnection doesn't write anything #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have tried writing data using the output stream acquired from
HttpConnection. The code is shown below.

               HttpConnection
conn=(HttpConnection)Connector.open(myurl);
               conn.setRequestMethod(HttpConnection.POST);
               conn.setRequestProperty("Content-Type", "application/octet-
stream");
               OutputStream os=conn.openOutputStream();
               DataOutputStream dos=new DataOutputStream(os);
               dos.writeUTF("This is my test");
               dos.flush();
               dos.close();
               os.close();

The problem I have is that this is sending nothing. I cant receive
anything from the other side.

Original issue reported on code.google.com by bar...@gmail.com on 22 Feb 2010 at 10:52

GoogleCodeExporter commented 8 years ago
Only GET works.

Original comment by bar...@gmail.com on 22 Feb 2010 at 10:53

GoogleCodeExporter commented 8 years ago
I need some information which platform versions are affected. My testing showed 
that
on Android 1.5 and 1.6 works fine but problem is with Android 2.0+. Can anyone
confirm my findings?

Original comment by bar...@gmail.com on 2 Jun 2010 at 9:52