- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for enqueueResponse (0.15 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt
import java.util.concurrent.LinkedBlockingQueue import java.util.logging.Logger import okhttp3.ExperimentalOkHttpApi /** * Default dispatcher that processes a script of responses. Populate the script by calling [enqueueResponse]. */ @ExperimentalOkHttpApi open class QueueDispatcher : Dispatcher() { protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue() private var failFastResponse: MockResponse? = null
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
val queueDispatcher = QueueDispatcher() queueDispatcher.enqueueResponse(MockResponse(inTunnel = true)) queueDispatcher.enqueueResponse(MockResponse(inTunnel = true)) queueDispatcher.enqueueResponse(MockResponse(body = "call2 response")) queueDispatcher.enqueueResponse(MockResponse(body = "call1 response"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
queueDispatcher.dispatch( RecordedRequest("", headersOf(), listOf(), 0L, Buffer(), 0, Socket()), ) mockResponse = queueDispatcher.peek() queueDispatcher.enqueueResponse(MockResponse()) queueDispatcher.shutdown() queueDispatcher.setFailFast(false) queueDispatcher.setFailFast(MockResponse()) } @Test @Ignore fun recordedRequest() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public fun <init> ()V public fun dispatch (Lokhttp3/mockwebserver/RecordedRequest;)Lokhttp3/mockwebserver/MockResponse; public final fun enqueueResponse (Lokhttp3/mockwebserver/MockResponse;)V public fun peek ()Lokhttp3/mockwebserver/MockResponse; public final fun setFailFast (Lokhttp3/mockwebserver/MockResponse;)V public final fun setFailFast (Z)V
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0) -
mockwebserver/api/mockwebserver3.api
public static final field Companion Lmockwebserver3/QueueDispatcher$Companion; public fun <init> ()V public fun clear ()V public fun dispatch (Lmockwebserver3/RecordedRequest;)Lmockwebserver3/MockResponse; public fun enqueueResponse (Lmockwebserver3/MockResponse;)V protected final fun getResponseQueue ()Ljava/util/concurrent/BlockingQueue; public fun peek ()Lmockwebserver3/MockResponse; public fun setFailFast (Lmockwebserver3/MockResponse;)V
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 03 21:59:45 UTC 2023 - 12.7K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
* so on. * * @throws ClassCastException if the default dispatcher has been * replaced with [setDispatcher][dispatcher]. */ fun enqueue(response: MockResponse) = (dispatcher as QueueDispatcher).enqueueResponse(response) /** * Starts the server on the loopback interface for the given port. * * @param port the port to listen to, or 0 for any available port. Automated tests should always
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 37.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
requestFinished.await() } return super.dispatch(request) } } dispatcher.enqueueResponse(MockResponse(body = "seed connection pool")) dispatcher.enqueueResponse(MockResponse(socketPolicy = DisconnectAfterRequest)) dispatcher.enqueueResponse(MockResponse(body = "retry success")) server.dispatcher = dispatcher listener = object : RecordingEventListener() {
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/KotlinSourceModernTest.kt
queueDispatcher.dispatch( RecordedRequest("", headersOf(), listOf(), 0L, Buffer(), 0, Socket()), ) mockResponse = queueDispatcher.peek() queueDispatcher.enqueueResponse(MockResponse()) queueDispatcher.shutdown() queueDispatcher.setFailFast(false) queueDispatcher.setFailFast(MockResponse()) } @Test fun recordedRequest() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)