I am using android-sdk-windows-1.0_r1 and need to translate a snip
code to use over android G1. Old is that:

           conn = (HttpConnection) Connector.open(url,
Connector.READ_WRITE);
            conn.setRequestMethod(HttpConnection.POST);
            conn.setRequestProperty("Content-Type", "application/octet-
stream");
            conn.setRequestProperty("Accept", "application/octet-stream");

            if(sessionCookie == null)
            {
                conn.setRequestProperty("version", "???");
            }
            else
            {
                conn.setRequestProperty("cookie", sessionCookie);
            }


            // Getting the output stream may flush the headers
            os = conn.openDataOutputStream();
            os.write(pos.getBytes());
            os.close();


I must used org.apache.http.client.HttpClient; package. The new
connection type will be:
                HttpClient conn = new DefaultHttpClient();
                HttpPost httppost = new HttpPost(url);

but I didn't understand what use to translate setRequestProperty, for
set all my prorprieties.

thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to