mirror of
https://github.com/square/okhttp.git
synced 2025-08-10 11:03:02 +03:00
Use idiomatic Kotlin in Request.kt (#5092)
- define @get:JvmName(...) for the following vals in constructor instead of passing builder: Builder. - url: HttpUrl - method: String - headers: Headers - body: RequestBody? - add @Deprecated(...) to the following functions. - fun url(): HttpUrl - fun method(): String - fun headers(): Headers - fun body(): RequestBody? - fun cacheControl(): CacheControl - clean up code where ()(Parentheses) is unnecessarily used.
This commit is contained in:
@@ -30,7 +30,7 @@ class JavaNetAuthenticator : okhttp3.Authenticator {
|
||||
override fun authenticate(route: Route?, response: Response): Request? {
|
||||
val challenges = response.challenges()
|
||||
val request = response.request()
|
||||
val url = request.url()
|
||||
val url = request.url
|
||||
val proxyAuthorization = response.code() == 407
|
||||
val proxy = route?.proxy() ?: Proxy.NO_PROXY
|
||||
|
||||
|
Reference in New Issue
Block a user