java - Upload complete event using HttpPost -
my app uploads image server. in order execute uploading, use httppost
class. here relevant code fragment:
try { httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("%path_to_server_page%"); httppost.setentity(new urlencodedformentity(namevaluepairs)); httpclient.execute(httppost); } catch (exception e) { system.out.println("connection error: " + e.tostring()); }
my question how can raise event , know if uploading has been finished sure file on server?
thanks.
probably, implementation of observer design pattern suitable solution.
reference: https://stackoverflow.com/a/6270150/462347
Comments
Post a Comment