Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 584 for call1 (0.02 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // The first call times out.
        val call1 = client.newCall(Request(server.url("/")))
        assertFailsWith<SocketTimeoutException> {
          call1.execute().use { response ->
            response.body.string()
          }
        }
    
        // The second call succeeds.
        val call2 = client.newCall(Request(server.url("/")))
        call2.execute().use { response ->
          assertThat(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 67.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/SocketFailureTest.kt

        var shouldClose: Boolean = false
        var lastSocket: Socket? = null
    
        override fun connectionAcquired(
          call: Call,
          connection: Connection,
        ) {
          lastSocket = connection.socket()
        }
    
        override fun requestHeadersStart(call: Call) {
          if (shouldClose) {
            lastSocket!!.close()
          }
        }
      }
    
      @Test
      fun socketFailureOnLargeRequestHeaders() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Jul 29 21:11:09 UTC 2025
    - 3K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt

        // makeSimpleCall() because it uses the MockResponse enqueued above.
        val callB = client.newCall(Request(server.url("/")))
        callB.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("abc")
        }
      }
    
      private fun makeSimpleCall() {
        server.enqueue(MockResponse(body = "healthy"))
        val callB = client.newCall(Request(server.url("/")))
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

            .build(),
        )
        var call =
          client.newCallWithListener(
            Request
              .Builder()
              .url(server.url("/"))
              .build(),
          )
        var response = call.execute()
        assertThat(response.code).isEqualTo(200)
        response.close()
        eventRecorder.clearAllEvents()
        call = call.cloneWithListener()
        response = call.execute()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.5K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt

            .build(),
        )
    
        val call1 = client.newCall(Request(server.url("/")))
        call1.execute().use { response ->
          val source = response.body.source()
          assertThat(response.header("h1")).isEqualTo("v1")
          assertThat(source.readUtf8()).isEqualTo("Hello")
          assertThat(response.trailers()).isEqualTo(headersOf("t1", "v2"))
        }
    
        val call2 = client.newCall(Request(server.url("/")))
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 08 21:45:04 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Call.kt

        computeIfAbsent: () -> T,
      ): T
    
      /**
       * Create a new, identical call to this one which can be enqueued or executed even if this call
       * has already been.
       *
       * The tags on the returned call will equal the tags as on [request]. Any tags that were computed
       * for this call will not be included on the cloned call. If necessary you may manually copy over
       * specific tags by re-computing them:
       *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/CallTagsTest.kt

            .url("https://square.com")
            .build()
        val callA = client.newCall(request)
        assertThat(callA.tag(String::class) { "a" }).isEqualTo("a")
        assertThat(callA.tag(String::class) { "b" }).isEqualTo("a")
    
        val callB = callA.clone()
        assertThat(callB.tag(String::class) { "c" }).isEqualTo("c")
        assertThat(callB.tag(String::class) { "d" }).isEqualTo("c")
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Oct 26 14:54:46 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt

      }
    
      /**
       * Cancel all calls currently enqueued or executing. Includes calls executed both
       * [synchronously][Call.execute] and [asynchronously][Call.enqueue].
       */
      @Synchronized
      fun cancelAll() {
        for (call in readyAsyncCalls) {
          call.call.cancel()
        }
        for (call in runningAsyncCalls) {
          call.call.cancel()
        }
        for (call in runningSyncCalls) {
          call.cancel()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 14:16:22 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

          call: Call,
          dispatcher: Dispatcher,
        ) {
          for (delegate in eventListeners) {
            delegate.dispatcherQueueEnd(call, dispatcher)
          }
        }
    
        override fun proxySelectStart(
          call: Call,
          url: HttpUrl,
        ) {
          for (delegate in eventListeners) {
            delegate.proxySelectStart(call, url)
          }
        }
    
        override fun proxySelectEnd(
          call: Call,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:03:04 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/RecordingExecutor.kt

      }
    
      fun finishJob(url: String) {
        val i = calls.iterator()
        while (i.hasNext()) {
          val call = i.next()
          if (call.request.url.toString() == url) {
            i.remove()
            dispatcherTest.dispatcher.finishedAccessor(call)
            return
          }
        }
        throw AssertionError("No such job: $url")
      }
    
      override fun shutdown() {
        shutdown = true
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 18:34:01 UTC 2025
    - 2.2K bytes
    - Viewed (0)
Back to top