Just wondering if anyone knows how to determine when a HTTP PUT request is complete. For eg:
HttpClient http = new DefaultHttpClient();
HttpPut putmethod = new HttpPut("http://abc.com/SETTINGS.TXT");
putmethod.setEntity(new StringEntity(data));
HttpResponse response = http.execute(putmethod);
How can I tell when the file has completely transferred/written. Do I need to monitor the HttpResponse? If so, what I am looking for?
Thanks
If your request is successfully complete then http client will return the success code 200 if it fails then it returns the another code (401 page not fount etc).
so you can check the code with the response and log appropriate message .
Example