Search Options

Results per page
Sort
Preferred Languages
Advance

Results 371 - 380 of 1,634 for buildID (0.07 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt

      private val client: OkHttpClient =
        OkHttpClient.Builder()
          .cache(
            Cache(
              directory = cacheDirectory,
              // 1 MiB.
              maxSize = 10L * 1024L * 1024L,
            ),
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build()
    
        val response1Body =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
        Request request = new Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Dec 24 03:46:30 UTC 2018
    - 2.1K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/PerCallSettings.kt

      fun run() {
        val request =
          Request.Builder()
            .url("http://httpbin.org/delay/1") // This URL is served with a 1 second delay.
            .build()
    
        // Copy to customize OkHttp for this request.
        val client1 =
          client.newBuilder()
            .readTimeout(500, TimeUnit.MILLISECONDS)
            .build()
        try {
          client1.newCall(request).execute().use { response ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

      }
    
      @Test
      fun `RSA issuer and signature`() {
        val root =
          HeldCertificate.Builder()
            .certificateAuthority(0)
            .rsa2048()
            .build()
        val certificate =
          HeldCertificate.Builder()
            .signedBy(root)
            .rsa2048()
            .build()
    
        val certificateByteString = certificate.certificate.encoded.toByteString()
    
        // Valid signature.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

        }
      };
    
      private final OkHttpClient client = new OkHttpClient.Builder()
          .addNetworkInterceptor(CHECK_HANDSHAKE_INTERCEPTOR)
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

        val requestBody =
          MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("title", "Square Logo")
            .addFormDataPart(
              "image",
              "logo-square.png",
              File("docs/images/logo-square.png").asRequestBody(MEDIA_TYPE_PNG),
            )
            .build()
    
        val request =
          Request.Builder()
            .header("Authorization", "Client-ID $IMGUR_CLIENT_ID")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .addSubjectAlternativeName("localhost.localdomain")
            .build()
        return@lazy HandshakeCertificates.Builder()
          .heldCertificate(heldCertificate)
          .addTrustedCertificate(heldCertificate.certificate)
          .build()
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        if (networkRequest == null && cacheResponse == null) {
          return Response.Builder()
            .request(chain.request())
            .protocol(Protocol.HTTP_1_1)
            .code(HTTP_GATEWAY_TIMEOUT)
            .message("Unsatisfiable Request (only-if-cached)")
            .sentRequestAtMillis(-1L)
            .receivedResponseAtMillis(System.currentTimeMillis())
            .build().also {
              listener.satisfactionFailure(call, it)
            }
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. okhttp-urlconnection/src/main/kotlin/okhttp3/JavaNetAuthenticator.kt

    /**
     * Do not use this.
     *
     * Instead, configure your OkHttpClient.Builder to use `Authenticator.JAVA_NET_AUTHENTICATOR`:
     *
     * ```
     *   val okHttpClient = OkHttpClient.Builder()
     *     .authenticator(okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR)
     *     .build()
     * ```
     */
    @Deprecated(message = "Use okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR instead")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

        ImmutableSet.Builder<String> builder = ImmutableSet.builder();
        for (ClassPath.LocationInfo location : ClassPath.locationsFrom(loader)) {
          for (ResourceInfo resource : location.scanResources()) {
            builder.add(resource.getResourceName());
          }
        }
        return builder.build();
      }
    
      private static boolean isWindows() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 25K bytes
    - Viewed (0)
Back to top