@ -22,7 +22,6 @@ abstract class AbsCallBack(
val mCall: Call,
private val eventListener: EventListener? = null,
private val responseCallback: Callback? = null
) : UrlRequest.Callback(), AutoCloseable {
val buffer = Buffer()
@ -10,6 +10,7 @@ import java.nio.ByteBuffer
@Keep
class BodyUploadProvider(private val body: RequestBody) : UploadDataProvider(), AutoCloseable {
private val buffer = Buffer()
init {
@ -17,6 +17,7 @@ import kotlin.coroutines.resumeWithException
@Suppress("unused")
class CronetCoroutineInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
if (chain.call().isCanceled()) {
throw IOException("Canceled")
@ -11,6 +11,7 @@ import java.io.IOException
class CronetInterceptor : Interceptor {
@Throws(IOException::class)
@ -14,8 +14,8 @@ import java.util.concurrent.TimeUnit
@RequiresApi(api = Build.VERSION_CODES.N)
class NewCallBack(originalRequest: Request, mCall: Call) : AbsCallBack(originalRequest, mCall) {
private val responseFuture = CompletableFuture<Response>()
override fun waitForDone(urlRequest: UrlRequest): Response {