Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for event (0.17 sec)

  1. okhttp-sse/src/test/java/okhttp3/sse/internal/Event.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.sse.internal
    
    internal data class Event(
      val id: String?,
      val type: String?,
      val data: String,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 720 bytes
    - Viewed (0)
  2. docs/features/events.md

    ![Events Diagram](../assets/images/events@2x.png)
    
    Here’s a [sample event listener](https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java) that prints each event with a timestamp.
    
    ```java
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  3. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

      }
    
      @Test
      fun idCleared() {
        consumeEvents(
          """
          |data: first event
          |id: 1
          |
          |data: second event
          |id
          |
          |data: third event
          |
          |
          """.trimMargin(),
        )
        assertThat(callbacks.remove()).isEqualTo(Event("1", null, "first event"))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          throw AssertionError("full event sequence: $fullEventSequence", e)
        }
      }
    
      /**
       * Remove and return the next event from the recorded sequence.
       *
       * @param eventClass a class to assert that the returned event is an instance of, or null to
       *     take any event class.
       * @param elapsedMs the time in milliseconds elapsed since the immediately-preceding event, or
       *     -1L to take any duration.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

      /** Returns the original request that initiated this event source. */
      fun request(): Request
    
      /**
       * Immediately and violently release resources held by this event source. This does nothing if
       * the event source has already been closed or canceled.
       */
      fun cancel()
    
      fun interface Factory {
        /**
         * Creates a new event source and immediately returns it. Creating an event source initiates an
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

            // 11
            "id\r".encodeUtf8(),
            // 12
            "id\n".encodeUtf8(),
            // 13
            "event: ".encodeUtf8(),
            // 14
            "event:".encodeUtf8(),
            // 15
            "event\r\n".encodeUtf8(),
            // 16
            "event\r".encodeUtf8(),
            // 17
            "event\n".encodeUtf8(),
            // 18
            "retry: ".encodeUtf8(),
            // 19
            "retry:".encodeUtf8(),
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  8. docs/changelogs/changelog_4x.md

        been received. Previously these events were incorrectly sent too early, when OkHttp was ready to
        read the response headers or body, which mislead tracing tools. Note that the `responseFailed()`
        event always used to follow one of these events; now it may be sent without them.
    
     *  New: Upgrade to Kotlin 1.3.61.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * [RFC 2817][1]. The HTTP CONNECT request that creates this tunnel connection is special: it
     * does not participate in any [interceptors][Interceptor] or [event listeners][EventListener]. It
     * doesn't include the motivating request's HTTP headers or even its full URL; only the target
     * server's hostname is sent to the proxy.
     *
     * Prior to sending any CONNECT request OkHttp always calls the proxy authenticator so that it may
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

        }
    
        private fun bodyIsStreaming(response: Response): Boolean {
          val contentType = response.body.contentType()
          return contentType != null && contentType.type == "text" && contentType.subtype == "event-stream"
        }
    
        companion object
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
Back to top