- Sort Score
- Result 10 results
- Languages All
Results 61 - 65 of 65 for responseBody (0.05 sec)
-
src/test/java/jcifs/http/NtlmHttpURLConnectionTest.java
new ByteArrayInputStream(new byte[0])); // Act - Trigger handshake int responseCode = ntlmConnection.getResponseCode(); // Assert - Verify we got the 401 response (simplified test) assertEquals(HTTP_UNAUTHORIZED, responseCode); // In a real scenario, the connection would reconnect and send Type1/Type3 messages
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.6K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
val url = server.url("/").toUrl() val connection = url.openConnection() as HttpURLConnection assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK) val refusedConnection = url.openConnection() as HttpURLConnection assertFailsWith<ConnectException> { refusedConnection.responseCode }.also { expected -> assertThat(expected.message!!).contains("refused") } } @Test
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Aug 03 22:38:00 UTC 2025 - 28K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt
val text = conn.inputStream.use { it.bufferedReader().readText() } assertEquals(200, conn.responseCode) assertTrue(text.contains("Disallow")) }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 6.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
shouldWriteToCache: Boolean, responseCode: Int, method: String = "GET", ) { var expectedResponseCode = responseCode val server = MockWebServer() val builder = MockResponse .Builder() .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) .code(responseCode) .body("ABCDE")Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 116.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
val proxy = authHeader.startsWith("Proxy-") val responseCode = if (proxy) 407 else 401 val authenticator = RecordingAuthenticator(null) java.net.Authenticator.setDefault(authenticator) server.enqueue( MockResponse .Builder() .code(responseCode) .addHeader(authHeader) .body("Please authenticate.") .build(),
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0)