We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3899f06 commit 4a26a63Copy full SHA for 4a26a63
network/src/main/java/com/anysoftkeyboard/janus/network/WikipediaClient.kt
@@ -20,6 +20,17 @@ class WikipediaClient(context: Context) {
20
21
private val okHttpClient =
22
OkHttpClient.Builder()
23
+ .addInterceptor { chain ->
24
+ val request =
25
+ chain
26
+ .request()
27
+ .newBuilder()
28
+ .header(
29
+ "User-Agent",
30
+ "Janus-translations-android/1.0 ([email protected]) OkHttp/5.x")
31
+ .build()
32
+ chain.proceed(request)
33
+ }
34
.addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
35
.cache(cache)
36
.build()
0 commit comments