- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for onlyRoute (0.11 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
val credential: String?, val scheme: String?, ) : Authenticator { val responses = mutableListOf<Response>() val routes = mutableListOf<Route>() fun onlyResponse() = responses.single() fun onlyRoute() = routes.single() @Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? { if (route == null) throw NullPointerException("route == null")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
assertThat(server.takeRequest().headers["Authorization"]).isNull() assertThat(server.takeRequest().headers["Authorization"]).isEqualTo(credential) assertThat(authenticator.onlyRoute().proxy).isEqualTo(Proxy.NO_PROXY) val response = authenticator.onlyResponse() assertThat( response.request.url .toUrl() .path, ).isEqualTo("/private")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
client = client .newBuilder() .authenticator(authenticator) .build() executeSynchronously("/") .assertCode(401) assertThat(authenticator.onlyRoute()).isNotNull() } @Test fun delete() { server.enqueue(MockResponse(body = "abc")) val request = Request .Builder() .url(server.url("/")) .delete()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0)