Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 144 for newBuilder (0.04 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxyTest.kt

        val client =
          clientTestRule
            .newClientBuilder()
            .proxy(socksProxy.proxy())
            .build()
        val url =
          server
            .url("/")
            .newBuilder()
            .host(SocksProxy.HOSTNAME_THAT_ONLY_THE_PROXY_KNOWS)
            .build()
        val request = Request.Builder().url(url).build()
        val response1 = client.newCall(request).execute()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

            @Throws(IOException::class)
            override fun writeTo(sink: BufferedSink) {
              delegate().writeTo(uppercaseSink(sink).buffer())
            }
          }
        return request
          .newBuilder()
          .method(request.method, uppercaseBody)
          .build()
      }
    
      private fun uppercaseSink(sink: Sink): Sink =
        object : ForwardingSink(sink) {
          @Throws(IOException::class)
          override fun write(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheRefreshTest.java

      public void testAutoRefresh() {
        FakeTicker ticker = new FakeTicker();
        IncrementingLoader loader = incrementingLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .refreshAfterWrite(3, MILLISECONDS)
                .expireAfterWrite(6, MILLISECONDS)
                .lenientParsing()
                .ticker(ticker)
                .build(loader);
        int expectedLoads = 0;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/UrlComponentEncodingTester.kt

        component: Component,
      ) {
        val builder = "http://host/".toHttpUrl().newBuilder()
        assertFailsWith<IllegalArgumentException> {
          component[builder] = codePointString
        }
      }
    
      private fun testPunycode(
        codePointString: String,
        component: Component,
      ) {
        val builder = "http://host/".toHttpUrl().newBuilder()
        component[builder] = codePointString
        val url = builder.build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  5. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

          @JvmName("create")
          fun Call.Factory.asEventSourceFactory(): Factory =
            Factory { request, listener ->
              val actualRequest =
                if (request.header("Accept") == null) {
                  request.newBuilder().addHeader("Accept", "text/event-stream").build()
                } else {
                  request
                }
    
              this.newCall(actualRequest).enqueueEventSource(listener)
            }
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/UnreadableResponseBody.kt

          """.trimMargin(),
        )
    
      override fun timeout() = Timeout.NONE
    
      override fun close() {
      }
    }
    
    fun Response.stripBody(): Response =
      newBuilder()
        .body(UnreadableResponseBody(body.contentType(), body.contentLength()))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 15:19:53 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt

                println("Challenges: ${response.challenges()}")
                val credential = Credentials.basic("jesse", "password1")
                return response.request
                  .newBuilder()
                  .header("Authorization", credential)
                  .build()
              }
            },
          ).build()
    
      fun run() {
        val request =
          Request
            .Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/mylasta/direction/FessConfigImpl.java

            return new ObjectiveProperties(resourcePath) { // for e.g. checking existence and filtering value
                Cache<String, String> cache = CacheBuilder.newBuilder().build();
    
                @Override
                public String get(final String propertyKey) {
                    final String plainValue = getFromCache(propertyKey);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Mar 15 06:53:53 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/Authenticate.java

              System.out.println("Challenges: " + response.challenges());
              String credential = Credentials.basic("jesse", "password1");
              return response.request().newBuilder()
                  .header("Authorization", credential)
                  .build();
            })
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  10. okhttp/api/jvm/okhttp.api

    	public static final fun get (Ljava/net/URL;)Lokhttp3/HttpUrl;
    	public fun hashCode ()I
    	public final fun host ()Ljava/lang/String;
    	public final fun isHttps ()Z
    	public final fun newBuilder ()Lokhttp3/HttpUrl$Builder;
    	public final fun newBuilder (Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
    	public static final fun parse (Ljava/lang/String;)Lokhttp3/HttpUrl;
    	public final fun password ()Ljava/lang/String;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
Back to top