- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for enqueueCancel (0.11 sec)
-
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
.body( """ |data: hey | | """.trimMargin(), ).setHeader("content-type", "text/event-stream") .build(), ) listener.enqueueCancel() // Will cancel in onOpen(). val request = Request.Builder() .url(server.url("/")) .build() val response = client.newCall(request).execute() processResponse(response, listener)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
import okhttp3.sse.EventSource import okhttp3.sse.EventSourceListener class EventSourceRecorder : EventSourceListener() { private val events = LinkedBlockingDeque<Any>() private var cancel = false fun enqueueCancel() { cancel = true } override fun onOpen( eventSource: EventSource, response: Response, ) { get().log("[ES] onOpen", Platform.INFO, null) events.add(Open(eventSource, response))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
.body( """ |data: hey | | """.trimMargin(), ).setHeader("content-type", "text/event-stream") .build(), ) listener.enqueueCancel() // Will cancel in onOpen(). newEventSource() listener.assertOpen() listener.assertFailure("canceled") } @Test fun badContentType() { server.enqueue(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 6.6K bytes - Viewed (0)