:sign0085:
I found CancelDownload in DownloadService module,Can you move it to HttpUtils2 module?
I send URL run long time and exit current activity, this httpjob not over,So I want cancel it.
I found CancelDownload in DownloadService module,Can you move it to HttpUtils2 module?
B4X:
Public Sub CancelDownload(url As String)
If jobs.ContainsKey(url) = False Then
Log("Ignoring cancel request.")
Return
End If
Dim job As HttpJob = jobs.Get(url)
Dim jt As JobTag = job.Tag
If jt.CountingStream.IsInitialized Then
jt.CountingStream.Close
Else
jt.Data.url = ""
End If
End Sub
I send URL run long time and exit current activity, this httpjob not over,So I want cancel it.