Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,443 for call1 (0.24 sec)

  1. okhttp/src/test/java/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(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .build(),
        )
        val call1 =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response1 = call1.execute()
        assertThat(response1.body.string()).isEqualTo("abc")
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/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("/")))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/EventListenerTest.kt

            .build(),
        )
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

            .build()
        val request = Request.Builder().url(sanUrl).build()
        val call1 = client1.newCall(request)
        call1.enqueue(
          object : Callback {
            @Throws(IOException::class)
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val call = calls[0]
        assertThat(call).contains("host=" + url.host)
        assertThat(call).contains("port=" + url.port)
        assertThat(call).contains("site=" + url.host)
        assertThat(call).contains("url=http://android.com")
        assertThat(call).contains("type=" + java.net.Authenticator.RequestorType.PROXY)
        assertThat(call).contains("prompt=Bar")
        assertThat(call).contains("protocol=http")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  7. docs/features/calls.md

    Calls are executed in one of two ways:
    
     * **Synchronous:** your thread blocks until the response is readable.
     * **Asynchronous:** you enqueue the request on any thread, and get [called back](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-callback/) on another thread when the response is readable.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Call.kt

     */
    package okhttp3
    
    import okio.IOException
    import okio.Timeout
    
    /**
     * A call is a request that has been prepared for execution. A call can be canceled. As this object
     * represents a single request/response pair (stream), it cannot be executed twice.
     */
    interface Call : Cloneable {
      /** Returns the original request that initiated this call. */
      fun request(): Request
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  9. docs/features/events.md

      }
    
      @Override public void callStart(Call call) {
        printEvent("callStart");
      }
    
      @Override public void callEnd(Call call) {
        printEvent("callEnd");
      }
    
      @Override public void dnsStart(Call call, String domainName) {
        printEvent("dnsStart");
      }
    
      @Override public void dnsEnd(Call call, String domainName, List<InetAddress> inetAddressList) {
        printEvent("dnsEnd");
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

        return null
      }
    
      /**
       * Cancel all calls currently enqueued or executing. Includes calls executed both
       * [synchronously][Call.execute] and [asynchronously][Call.enqueue].
       */
      fun cancelAll() {
        this.withLock {
          for (call in readyAsyncCalls) {
            call.call.cancel()
          }
          for (call in runningAsyncCalls) {
            call.call.cancel()
          }
          for (call in runningSyncCalls) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top