[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread Mark Murphy
fala70 wrote: > Hi, I've a problem to translate follow code to org.apache.http.*; Questions related to the Apache HTTPComponents are best asked of the Apache HTTPComponents team: http://hc.apache.org/ -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Dev

[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread Adam Connors
Hope this is useful: 88: HttpPost post = null; 89: post = new HttpPost(url); 91: post.addHeader("Content-Type", "multipart/related; boundary=\"END_OF_PART\""); 92: post.addHeader("MIME-version", "1.0"); 93: 116: 117: HttpEntity body = new ByteArrayEntity(body

[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread fala70
thanks Adam, for your answer. I tried your instructions but when I call the execute I receive an IOException. Follow the stack log. Any idea ??? Also I tried to use the same Header, but without success. httppost.addHeader("Content-Type", "application/octet- stream");

[android-beginners] Re: HttpClient and POST requests

2008-11-23 Thread Adam Connors
Best guess... Do you have the INTERNET permission correctly declared in your manifest...? On 11/22/08, fala70 <[EMAIL PROTECTED]> wrote: > > thanks Adam, for your answer. I tried your instructions but when I > call the execute I receive an IOException. Follow the stack log. Any > idea ??? > > Als

[android-beginners] Re: HttpClient and POST requests

2008-11-23 Thread fala70
Yeah Thanks Adam now work On 23 Nov, 10:36, "Adam Connors" <[EMAIL PROTECTED]> wrote: > Best guess... Do you have the INTERNET permission correctly declared > in your manifest...? > > On 11/22/08, fala70 <[EMAIL PROTECTED]> wrote: > > > > > thanks Adam, for your answer. I tried your instructi

[android-beginners] Re: HttpClient and POST requests

2008-12-17 Thread agal
Hi, I would like to know how to set headers in an Http Post request. This is what I tried: ... HttpPost postMethod=new HttpPost(posturl); postMethod.addHeader("Content-Type", "something"); postMethod.addHeader("Content-Length", "length of content"); String requestBody = "some text"; postMethod.se