Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for CallStart (0.2 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

          long nowNanos = System.nanoTime();
          if (name.equals("callStart")) {
            callStartNanos = nowNanos;
          }
          long elapsedNanos = nowNanos - callStartNanos;
          System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name);
        }
    
        @Override public void callStart(Call call) {
          printEvent("callStart");
        }
    
        @Override public void proxySelectStart(Call call, HttpUrl url) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

            .build(),
        )
        val response = client.newCall(request().build()).execute()
        assertThat(response.body).isNotNull()
        response.body.bytes()
        logRecorder
          .assertLogMatch(Regex("""callStart: Request\{method=GET, url=$url\}"""))
          .assertLogMatch(Regex("""proxySelectStart: $url"""))
          .assertLogMatch(Regex("""proxySelectEnd: \[DIRECT]"""))
          .assertLogMatch(Regex("""dnsStart: ${url.host}"""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
        assertEquals(
          listOf(
            "CallStart", "ProxySelectStart", "ProxySelectEnd", "DnsStart", "DnsEnd",
            "ConnectStart", "SecureConnectStart", "SecureConnectEnd", "ConnectEnd",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/EventListener.kt

       *
       * This will be invoked only once for a single [Call]. Retries of different routes or redirects
       * will be handled within the boundaries of a single [callStart] and [callEnd]/[callFailed] pair.
       */
      open fun callStart(call: Call) {
      }
    
      /**
       * Invoked prior to a proxy selection.
       *
       * This will be invoked for route selection regardless of whether the client
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

     */
    class LoggingEventListener private constructor(
      private val logger: HttpLoggingInterceptor.Logger,
    ) : EventListener() {
      private var startNs: Long = 0
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
        logWithTime("callStart: ${call.request()}")
      }
    
      override fun proxySelectStart(
        call: Call,
        url: HttpUrl,
      ) {
        logWithTime("proxySelectStart: $url")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. okhttp-android/src/test/kotlin/okhttp3/android/AndroidLoggingTest.kt

        assertThat(
          logs.map {
            it.msg.replace(
              "\\[\\d+ ms] ".toRegex(),
              "",
            )
          },
        ).containsExactly(
          "callStart: Request{method=GET, url=http://google.com/robots.txt}",
          "proxySelectStart: http://google.com/",
          "proxySelectEnd: [DIRECT]",
          "dnsStart: google.com",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/DuplexTest.kt

    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

        }.also { expected ->
          assertThat(expected.message!!).startsWith("unexpected end of stream on http://")
        }
    
        assertThat(listener.recordedEventTypes()).containsExactly(
          "CallStart", "ConnectionAcquired", "RequestHeadersStart", "RequestHeadersEnd",
          "RequestBodyStart", "RequestBodyEnd", "ResponseFailed", "ConnectionReleased", "CallFailed",
        )
        listener.clearAllEvents()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        var dns: Dns = Dns { TODO() }
    
        val system: Dns = Dns.SYSTEM
      }
    
      @Test
      fun eventListener() {
        val eventListener =
          object : EventListener() {
            override fun callStart(call: Call) = TODO()
    
            override fun dnsStart(
              call: Call,
              domainName: String,
            ) = TODO()
    
            override fun dnsEnd(
              call: Call,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
Back to top