|
|
|
@ -40,10 +40,8 @@ val cronetEngine: ExperimentalCronetEngine by lazy { |
|
|
|
|
//这会导致Jsoup的网络请求出现问题,暂时不接管系统URL |
|
|
|
|
//URL.setURLStreamHandlerFactory(CronetURLStreamHandlerFactory(engine)) |
|
|
|
|
return@lazy engine |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun buildRequest(request: Request, callback: UrlRequest.Callback): UrlRequest { |
|
|
|
|
val url = request.url.toString() |
|
|
|
|
val headers: Headers = request.headers |
|
|
|
@ -72,6 +70,5 @@ fun buildRequest(request: Request, callback: UrlRequest.Callback): UrlRequest { |
|
|
|
|
|
|
|
|
|
}.build() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|