- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for onlyResponse (0.07 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
import okhttp3.Route class RecordingOkAuthenticator( 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? {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
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") assertThat(response.challenges()).isEqualTo(listOf(Challenge("Basic", "protected area"))) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0)