Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for completado (0.15 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // the connection flow-control window so new requests can proceed.
        call1.cancel()
        assertThat(
          response1.body.source().discard(1, TimeUnit.SECONDS),
          "Call should not have completed successfully.",
        ).isFalse()
        val call2 = client.newCall(Request(server.url("/")))
        val response2 = call2.execute()
        assertThat(response2.body.string()).isEqualTo("abc")
      }
    
    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. samples/guide/src/main/java/okhttp3/recipes/CancelCall.java

        }, 1, TimeUnit.SECONDS);
    
        System.out.printf("%.2f Executing call.%n", (System.nanoTime() - startNanos) / 1e9f);
        try (Response response = call.execute()) {
          System.out.printf("%.2f Call was expected to fail, but completed: %s%n",
              (System.nanoTime() - startNanos) / 1e9f, response);
        } catch (IOException e) {
          System.out.printf("%.2f Call failed as expected: %s%n",
              (System.nanoTime() - startNanos) / 1e9f, e);
        }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

    import okio.sink
    import okio.source
    
    /**
     * A socket connection to a remote peer. A connection hosts streams which can send and receive
     * data.
     *
     * Many methods in this API are **synchronous:** the call is completed before the method returns.
     * This is typical for Java but atypical for HTTP/2. This is motivated by exception transparency:
     * an [IOException] that was triggered by a certain caller can be caught and handled by that caller.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        assertThat(readFileOrNull(getCleanFile("a", 0))).isEqualTo(afterRemoveFileContents)
        assertThat(readFileOrNull(getCleanFile("a", 1))).isEqualTo(afterRemoveFileContents)
    
        // After the edit is completed, its entry is still gone.
        a.setString(1, "a1")
        a.commit()
        assertAbsent("a")
        assertThat(cache.size()).isEqualTo(0)
      }
    
      @ParameterizedTest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt

          Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build()
    
        client.newCall(request).execute().use { response ->
          println("Response completed: $response")
        }
      }
    }
    
    fun main() {
      ConfigureTimeouts().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/Progress.java

          boolean firstUpdate = true;
    
          @Override public void update(long bytesRead, long contentLength, boolean done) {
            if (done) {
              System.out.println("completed");
            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

            super.close()
            complete(null)
          } catch (e: IOException) {
            throw complete(e)
          }
        }
    
        private fun <E : IOException?> complete(e: E): E {
          if (completed) return e
          completed = true
          return bodyComplete(bytesReceived, responseDone = false, requestDone = true, e = e)
        }
      }
    
      /** A response body that fires events when it completes. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.2K bytes
    - Viewed (2)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

        System.out.printf("%.2f Executing call.%n", (System.nanoTime() - startNanos) / 1e9f)
        try {
          call.execute().use { response ->
            System.out.printf(
              "%.2f Call was expected to fail, but completed: %s%n",
              (System.nanoTime() - startNanos) / 1e9f,
              response,
            )
          }
        } catch (e: IOException) {
          System.out.printf(
            "%.2f Call failed as expected: %s%n",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Connection.kt

     * When the maximum concurrent streams limit is reduced, some allocations will be rescinded.
     * Attempting to create new streams on these allocations will fail.
     *
     * Note that an allocation may be released before its stream is completed. This is intended to make
     * bookkeeping easier for the caller: releasing the allocation as soon as the terminal stream has
     * been found. But only complete the stream once its data stream has been exhausted.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  10. docs/recipes.md

            System.out.printf("%.2f Executing call.%n", (System.nanoTime() - startNanos) / 1e9f)
            try {
              call.execute().use { response ->
                System.out.printf("%.2f Call was expected to fail, but completed: %s%n",
                    (System.nanoTime() - startNanos) / 1e9f, response)
              }
            } catch (e: IOException) {
              System.out.printf("%.2f Call failed as expected: %s%n",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
Back to top