Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 144 for newBuilder (0.06 sec)

  1. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

              handshakeCertificates.trustManager,
            ).dns(dns)
            .build()
    
        server.enqueue(MockResponse())
    
        val url =
          server
            .url("/")
            .newBuilder()
            .host("localhost.localdomain")
            .build()
        val call = client.newCall(Request(url = url))
        val response = call.execute()
        assertThat(response.isSuccessful).isTrue()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

        )
        val client1 =
          client
            .newBuilder()
            .readTimeout(Duration.ofSeconds(2))
            .build()
        val call1 =
          client1
            .newCall(
              Request
                .Builder()
                .url(server.url("/"))
                .build(),
            )
        val client2 =
          client
            .newBuilder()
            .readTimeout(Duration.ofMillis(200))
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            .also {
              listener.satisfactionFailure(call, it)
            }
        }
    
        // If we don't need the network, we're done.
        if (networkRequest == null) {
          return cacheResponse!!
            .newBuilder()
            .cacheResponse(cacheResponse.stripBody())
            .build()
            .also {
              listener.cacheHit(call, it)
            }
        }
    
        if (cacheResponse != null) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client
            .newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client
            .newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheStrategy.kt

          }
    
          val conditionalRequestHeaders = request.headers.newBuilder()
          conditionalRequestHeaders.addLenient(conditionName, conditionValue!!)
    
          val conditionalRequest =
            request
              .newBuilder()
              .headers(conditionalRequestHeaders.build())
              .build()
          return CacheStrategy(conditionalRequest, cacheResponse)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12K bytes
    - Viewed (0)
  6. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

          "ConnectionReleased",
          "CallEnd",
        )
      }
    
      @Test
      fun sseReauths() {
        client =
          client
            .newBuilder()
            .authenticator { route, response ->
              response.request
                .newBuilder()
                .header("Authorization", "XYZ")
                .build()
            }.build()
        server.enqueue(
          MockResponse(
            code = 401,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  7. api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlNode.java

     * This interface represents a single node in an XML document tree, containing information about
     * the node's name, value, attributes, and child nodes.
     *
     * <p>Example usage:</p>
     * <pre>
     * XmlNode node = XmlNode.newBuilder()
     *     .name("configuration")
     *     .attribute("version", "1.0")
     *     .child(XmlNode.newInstance("property", "value"))
     *     .build();
     * </pre>
     *
     * @since 4.0.0
     */
    @Experimental
    @ThreadSafe
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Sat Jul 19 11:09:56 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  8. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

        val httpClient =
          HttpClient
            .newBuilder()
            .followRedirects(NORMAL)
            .build()
    
        server.enqueue(
          MockResponse
            .Builder()
            .body("hello, Java HTTP Client")
            .build(),
        )
    
        val request =
          HttpRequest
            .newBuilder(server.url("/").toUri())
            .header("Accept", "text/plain")
            .build()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CompressionInterceptor.kt

      override fun intercept(chain: Interceptor.Chain): Response =
        if (algorithms.isNotEmpty() && chain.request().header("Accept-Encoding") == null) {
          val request =
            chain
              .request()
              .newBuilder()
              .header("Accept-Encoding", acceptEncoding)
              .build()
    
          val response = chain.proceed(request)
    
          decompress(response)
        } else {
          chain.proceed(chain.request())
        }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 3.2K bytes
    - Viewed (1)
  10. android/guava-tests/test/com/google/common/cache/PackageSanityTests.java

              @Override
              public Object load(Object key) {
                return key;
              }
            });
        setDefault(LocalCache.class, new LocalCache<Object, Object>(CacheBuilder.newBuilder(), null));
        setDefault(CacheBuilder.class, CacheBuilder.newBuilder());
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.3K bytes
    - Viewed (0)
Back to top