mirror of
https://github.com/square/okhttp.git
synced 2025-11-26 06:43:09 +03:00
Spotless code formatter
This commit is contained in:
@@ -156,7 +156,8 @@ class HttpLoggingInterceptor @JvmOverloads constructor(
|
||||
val requestBody = request.body()
|
||||
|
||||
val connection = chain.connection()
|
||||
var requestStartMessage = ("--> ${request.method()} ${request.url()}${if (connection != null) " " + connection.protocol() else ""}")
|
||||
var requestStartMessage =
|
||||
("--> ${request.method()} ${request.url()}${if (connection != null) " " + connection.protocol() else ""}")
|
||||
if (!logHeaders && requestBody != null) {
|
||||
requestStartMessage += " (${requestBody.contentLength()}-byte body)"
|
||||
}
|
||||
@@ -312,9 +313,9 @@ class HttpLoggingInterceptor @JvmOverloads constructor(
|
||||
|
||||
private fun bodyHasUnknownEncoding(headers: Headers): Boolean {
|
||||
val contentEncoding = headers["Content-Encoding"]
|
||||
return (contentEncoding != null
|
||||
&& !contentEncoding.equals("identity", ignoreCase = true)
|
||||
&& !contentEncoding.equals("gzip", ignoreCase = true))
|
||||
return (contentEncoding != null &&
|
||||
!contentEncoding.equals("identity", ignoreCase = true) &&
|
||||
!contentEncoding.equals("gzip", ignoreCase = true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,10 @@ class LoggingEventListener private constructor(
|
||||
}
|
||||
|
||||
override fun connectEnd(
|
||||
call: Call, inetSocketAddress: InetSocketAddress, proxy: Proxy, protocol: Protocol?
|
||||
call: Call,
|
||||
inetSocketAddress: InetSocketAddress,
|
||||
proxy: Proxy,
|
||||
protocol: Protocol?
|
||||
) {
|
||||
logWithTime("connectEnd: $protocol")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user