- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for MockResponse (0.23 sec)
-
okhttp/src/test/java/okhttp3/CacheTest.kt
} private fun testServerPrematureDisconnect(transferKind: TransferKind) { val mockResponse = MockResponse.Builder() transferKind.setBody(mockResponse, "ABCDE\nFGHIJKLMNOPQRSTUVWXYZ", 16) server.enqueue(truncateViolently(mockResponse, 16).build()) server.enqueue( MockResponse.Builder() .body("Request #2") .build(), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.isEqualTo("INFO: Callback failure for call to " + server.url("/") + "...") } @Test fun connectionPooling() { server.enqueue(MockResponse(body = "abc")) server.enqueue(MockResponse(body = "def")) server.enqueue(MockResponse(body = "ghi")) executeSynchronously("/a").assertBody("abc") executeSynchronously("/b").assertBody("def") executeSynchronously("/c").assertBody("ghi")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
*/ @Test fun unauthorizedResponseHandling() { val mockResponse = MockResponse( code = HttpURLConnection.HTTP_UNAUTHORIZED, headers = headersOf("WWW-Authenticate", "challenge"), body = "Unauthorized", ) server.enqueue(mockResponse) server.enqueue(mockResponse) server.enqueue(mockResponse) val response = getResponse(newRequest("/"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0)