- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for mockResponse (0.09 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
} internal constructor(mockResponse: MockResponse) { this.inTunnel = mockResponse.inTunnel this.informationalResponses = mockResponse.informationalResponses.toMutableList() this.status = mockResponse.status this.headers = mockResponse.headers.newBuilder() this.trailers = mockResponse.trailers.newBuilder() this.bodyVar = mockResponse.body
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
val pushPromises: List<PushPromise> get() = promises init { setResponseCode(200) setHeader("Content-Length", 0L) } public override fun clone(): MockResponse { val result = super.clone() as MockResponse result.headersBuilder = headersBuilder.build().newBuilder() result.promises = promises.toMutableList() return result } @JvmName("-deprecated_getStatus") @Deprecated(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("") mockResponse = mockResponse.addHeader("", "") mockResponse = mockResponse.addHeaderLenient("", Any()) mockResponse = mockResponse.setHeader("", Any()) mockResponse.headers = headersOf() mockResponse.trailers = headersOf()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
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/internal/ws/WebSocketHttpTest.kt
MockResponse.Builder() .code(408) .build(), ) webServer.enqueue( MockResponse.Builder() .webSocketUpgrade(serverListener) .build(), ) val webSocket: WebSocket = newWebSocket() clientListener.assertOpen() val server = serverListener.assertOpen() webSocket.send("abc") serverListener.assertTextMessage("abc") server.send("def")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 35.2K bytes - Viewed (0) -
mockwebserver/api/mockwebserver3.api
public final fun addHeaderLenient (Ljava/lang/String;Ljava/lang/Object;)Lmockwebserver3/MockResponse$Builder; public final fun addInformationalResponse (Lmockwebserver3/MockResponse;)Lmockwebserver3/MockResponse$Builder; public final fun addPush (Lmockwebserver3/PushPromise;)Lmockwebserver3/MockResponse$Builder; public final fun body (Ljava/lang/String;)Lmockwebserver3/MockResponse$Builder;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 03 21:59:45 UTC 2023 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
.requestIOException() .exhaustResponse() server.enqueue( MockResponse.Builder() .clearHeaders() .code(HttpURLConnection.HTTP_MOVED_PERM) .addHeader("Location: /b") .streamHandler(body) .build(), ) server.enqueue( MockResponse.Builder() .body("this is /b") .build(), ) val call =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
val mockResponse = MockResponse.Builder() .socketPolicy(DoNotReadRequestBody(ErrorCode.NO_ERROR.httpCode)) .trailers(headersOf("caboose", "xyz")) // Trailers always work for HTTP/2, but only for chunked bodies in HTTP/1. if (http2) { mockResponse.body("abc") } else { mockResponse.chunkedBody("abc", 1) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
} @Test fun connectionsAreReused() { server.enqueue(MockResponse(body = "a")) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/")) assertConnectionReused(request, request) } @Test fun connectionsAreReusedForPosts() { server.enqueue(MockResponse(body = "a")) server.enqueue(MockResponse(body = "b")) val request = Request(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K 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)