Hi, from time to time I obtain NonRepeatableRequestException while
sending image to server. Here is my code:

 HttpParams params = new BasicHttpParams();

SchemeRegistry registry = new SchemeRegistry();
        registry.register(new Scheme("http",
PlainSocketFactory.getSocketFactory(), 80));

DefaultHttpClient httpclient = new DefaultHttpClient(new
ThreadSafeClientConnManager(params, registry), params);

HttpPost httpPost = new HttpPost(uri);
SimpleMultipartEntity multipartContent = new SimpleMultipartEntity();
multipartContent.addPart(propName, filename, inputStream,
contentType);
httpPost.setEntity(multipartContent);
httpclient.getParams().setParameter("http.protocol.expect-continue",
false);

java.util.logging.Logger.getLogger("httpclient.wire.header").setLevel(java.util.logging.Level.FINEST);
java.util.logging.Logger.getLogger("httpclient.wire.content").setLevel(java.util.logging.Level.FINEST);
HttpResponse response = httpclient.execute(httpPost);



What can be wrong here? Thank you in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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