Skip to content

Commit 930eb02

Browse files
authored
Merge pull request #331 from hotwired/fix-logging-interceptor
Fix potential crash from HTTP logging interceptor
2 parents f63e94f + ea825ac commit 930eb02

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

turbo/src/main/kotlin/dev/hotwire/turbo/http/TurboHttpClient.kt

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import java.util.concurrent.TimeUnit
1717
object TurboHttpClient {
1818
private var cache: Cache? = null
1919
private var httpCacheSize = 100L * 1024L * 1024L // 100 MBs
20+
private val loggingInterceptor = HttpLoggingInterceptor().apply {
21+
level = HttpLoggingInterceptor.Level.BASIC
22+
}
2023

2124
internal var instance = buildNewHttpClient()
2225

@@ -64,8 +67,4 @@ object TurboHttpClient {
6467

6568
return builder.build()
6669
}
67-
68-
private val loggingInterceptor = HttpLoggingInterceptor().apply {
69-
level = HttpLoggingInterceptor.Level.BASIC
70-
}
7170
}

0 commit comments

Comments
 (0)