How to set the timeout for HTTP multipart file post. I want to upload image to the server at the time internet connection is not there how to handle that situation?
Asked
Active
Viewed 1,805 times
1 Answers
0
Finally i found the solution for that here is the code to set the timeout for HTTPClient
HttpParams httpParameters = new BasicHttpParams();
int timeoutConnection = 30000; HttpConnectionParams.setConnectionTimeout(httpParameters,timeoutConnection);
int timeoutSocket = 30000;
HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);
HttpClient httpClient = new DefaultHttpClient(httpParameters);

BalaMurugan
- 31
- 4
-
please give suggestion if you find better solution. – BalaMurugan Jun 06 '12 at 05:33