mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Handle Brotli-compressed responses
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
7e8196e9d1
commit
0efcd9ae13
2 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,7 @@ dependencies {
|
|||
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:okhttp-brotli:$okhttpVersion")
|
||||
implementation("com.squareup.okio:okio:3.4.0")
|
||||
|
||||
// Chucker
|
||||
|
|
|
@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.network.interceptor.UncaughtExceptionInterceptor
|
|||
import eu.kanade.tachiyomi.network.interceptor.UserAgentInterceptor
|
||||
import okhttp3.Cache
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.brotli.BrotliInterceptor
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.io.File
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -36,6 +37,7 @@ class NetworkHelper(val context: Context) {
|
|||
.connectTimeout(30, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.callTimeout(2, TimeUnit.MINUTES)
|
||||
.addInterceptor(BrotliInterceptor)
|
||||
.addInterceptor(UncaughtExceptionInterceptor())
|
||||
.addInterceptor(userAgentInterceptor)
|
||||
.apply {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue