How to cancel LrHttp.post calls
Hi,
I'm working on an export/publish service. Before the uploading happens, there is some interaction with the remote application. In general, whenever I launch an call I'd like to provide some feedback to the user that it's doing something and give them the option of canceling. Currently, I have a LrTasks.startAsyncTask which leads into LrFunctionContext.callWithContext and then a LrDialogs.showModalProgressDialog. After the dialog box comes up, the function drops into an LrHttp.post call. I'm trying to figure out how if there is a way to connect the isCanceled property of the progressScope to the ability to cancel the LrHttp.post call. (Currently, the only thing I can think of is to write a byte feeding and have it suddenly stop feeding bits. Any thoughts?
-Scott Selberg