Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for succeeded (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            // that happens, then we will have buffered bytes that are needed by the SSLSocket!
            // This check is imperfect: it doesn't tell us whether a handshake will succeed, just
            // that it will almost certainly fail because the proxy has sent unexpected data.
            if (source?.buffer?.exhausted() == false || sink?.buffer?.exhausted() == false) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        try {
          server.url("/a").toUrl().openConnection().getInputStream()
          fail<Any>()
        } catch (expected: IOException) {
        }
        server.url("/b").toUrl().openConnection().getInputStream() // Should succeed.
      }
    
      /**
       * Throttle the request body by sleeping 500ms after every 3 bytes. With a 6-byte request, this
       * should yield one sleep for a total delay of 500ms.
       */
      @Test
      fun throttleRequest() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        serverIpv4.enqueue(
          MockResponse(body = "this was the 2nd request on IPv4"),
        )
        serverIpv6.enqueue(
          MockResponse(body = "unexpected call to IPv6"),
        )
    
        // Confirm the retry succeeds on the same connection.
        val call = client.newCall(Request(url))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("this was the 2nd request on IPv4")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * typically false on Windows.
     *
     * If this returns false we won't permit simultaneous reads and writes. When writes commit we need
     * to delete the previous snapshots, and that won't succeed if the file is open. (We do permit
     * multiple simultaneous reads.)
     *
     * @param file a file in the directory to check. This file shouldn't already exist!
     */
    internal fun FileSystem.isCivilized(file: Path): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. docs/recipes.md

                .readTimeout(500, TimeUnit.MILLISECONDS)
                .build()
            try {
              client1.newCall(request).execute().use { response ->
                println("Response 1 succeeded: $response")
              }
            } catch (e: IOException) {
              println("Response 1 failed: $e")
            }
    
            // Copy to customize OkHttp for this request.
            val client2 = client.newBuilder()
    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)
  6. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        assertThat(response1.body.string()).isEqualTo("abc")
        response1.close()
    
        // Force a fresh connection for the next request.
        client.connectionPool.evictAll()
    
        // Confirm that a second request also succeeds. This should detect caching problems.
        server.enqueue(
          MockResponse.Builder()
            .body("def")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        val call2 =
    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)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

          server.url("/a").toUrl().openConnection().getInputStream()
          fail<Unit>()
        } catch (expected: IOException) {
          // Expected.
        }
        server.url("/b").toUrl().openConnection().getInputStream() // Should succeed.
      }
    
      @Test
      fun clearDispatcherQueue() {
        server.enqueue(MockResponse(body = "A"))
        (server.dispatcher as QueueDispatcher).clear()
        server.enqueue(MockResponse(body = "B"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top