Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 213 for unexpectedly (0.05 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/TlsVersion.kt

          when (javaName) {
            "TLSv1.3" -> TLS_1_3
            "TLSv1.2" -> TLS_1_2
            "TLSv1.1" -> TLS_1_1
            "TLSv1" -> TLS_1_0
            "SSLv3" -> SSL_3_0
            else -> throw IllegalArgumentException("Unexpected TLS version: $javaName")
          }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/PostFile.kt

            body = file.asRequestBody(MEDIA_TYPE_MARKDOWN),
          )
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    
      companion object {
        val MEDIA_TYPE_MARKDOWN = "text/x-markdown; charset=utf-8".toMediaType()
      }
    }
    
    fun main() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/Authenticate.java

            .url("http://publicobject.com/secrets/hellosecret.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new Authenticate().run();
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxyTest.kt

            override fun select(uri: URI) = listOf(socksProxy.proxy())
    
            override fun connectFailed(
              uri: URI,
              socketAddress: SocketAddress,
              e: IOException,
            ) = error("unexpected call")
          }
        val client =
          clientTestRule
            .newClientBuilder()
            .proxySelector(proxySelector)
            .build()
        val request = Request.Builder().url(server.url("/")).build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            VERSION_1 != version ||
            appVersion.toString() != appVersionString ||
            valueCount.toString() != valueCountString ||
            blank.isNotEmpty()
          ) {
            throw IOException(
              "unexpected journal header: [$magic, $version, $valueCountString, $blank]",
            )
          }
    
          var lineCount = 0
          while (true) {
            try {
              readJournalLine(readUtf8LineStrict())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 34.7K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt

                partCount++
                break@afterBoundaryLoop
              }
    
              1 -> {
                // "--": No more parts.
                if (whitespace) throw ProtocolException("unexpected characters after boundary")
                if (partCount == 0) throw ProtocolException("expected at least 1 part")
                noMoreParts = true
                return null
              }
    
              2, 3 -> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 02:11:14 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java

            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          Headers responseHeaders = response.headers();
          for (int i = 0; i < responseHeaders.size(); i++) {
            System.out.println(responseHeaders.name(i) + ": " + responseHeaders.value(i));
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.5K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java

            .url("https://publicobject.com/secrets/hellosecret.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PreemptiveAuth().run();
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Nov 05 07:46:46 UTC 2018
    - 2.1K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt

     *
     * Implementations of this interface throw [IOException] to signal connectivity failures. This
     * includes both natural exceptions such as unreachable servers, as well as synthetic exceptions
     * when responses are of an unexpected type or cannot be decoded.
     *
     * Other exception types cancel the current call:
     *
     *  * For synchronous calls made with [Call.execute], the exception is propagated to the caller.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

        synchronized (this) {
          listener = listeners.get(state);
        }
    
        if (code == null || listener == null) {
          return new MockResponse()
              .setResponseCode(404)
              .setBody("unexpected request");
        }
    
        try {
          OAuthSession session = slackApi.exchangeCode(code, redirectUrl());
          listener.sessionGranted(session);
        } catch (IOException e) {
          return new MockResponse()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 3.8K bytes
    - Viewed (0)
Back to top