Closed Zhao-Michael closed 4 months ago
No current plans for uploading ..... regarding okHttp3 .
InputStream/OutputStream
classes than it's super easy to write a custom Connection Handler.I will add examples shortly.
Hi @tanoDxyz,
I try to add the okhttp3 as the URLConnectionHandler, mostly looks goods.
Expect that data class "RemoteConnection" (https://github.com/tanoDxyz/GDownload/blob/40dddae11544acdbf37ae781cd806c21763bed3b/gdownload/src/main/java/com/tanodxyz/gdownload/connection/RemoteConnection.kt#L9) needs to update:
since okhttp3 didn't have URLConnection (I think....), so "var connection: URLConnection," may change to var connection: URLConnection?, or just a callback like "var disconnect: () -> Unit = {}"
Sorry for late response! very busy these days.
actually ur right...
We have to change java.net.URLConnection
from RemoteConnection
class.
Or Maybe preserve the interface to custom to support upload data.....
BTW, I don't know if support the okhttp3 as the underlying connection handler ...