Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for newBuilder (0.05 sec)

  1. 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)
  2. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt

          if (response.code == 401) {
            assertThat(response.body.string()).isEqualTo("{\"error\":{\"message\":\"No auth credentials found\",\"code\":401}}")
            request = request.newBuilder().header("Authorization", "XYZ").build()
          } else {
            response.processEventSource(listener)
            listener.assertOpen()
            listener.assertEvent(null, null, "hey")
            listener.assertClose()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 13:49:38 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  3. 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)
  4. docs/recipes.md

    All the HTTP client configuration lives in `OkHttpClient` including proxy settings, timeouts, and caches. When you need to change the configuration of a single call, call `OkHttpClient.newBuilder()`. This returns a builder that shares the same connection pool, dispatcher, and configuration with the original client. In the example below, we make one request with a 500 ms timeout and another with a 3000 ms timeout.
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

          while (responseBody.read(buffer) != -1) {
          }
        }
        responseBody.close()
      }
    
      @Test
      fun forciblyStopDispatcher() {
        client =
          client
            .newBuilder()
            .fastFallback(true)
            .build()
    
        val callFailure = CompletableFuture<Exception>()
    
        server.enqueue(
          MockResponse()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/helper/SystemHelper.java

            filterPathEncoding = fessConfig.getPathEncoding();
            supportedLanguages = fessConfig.getSupportedLanguagesAsArray();
            langItemsCache = CacheBuilder.newBuilder()
                    .maximumSize(20)
                    .expireAfterAccess(1, TimeUnit.HOURS)
                    .build(new CacheLoader<String, List<Map<String, String>>>() {
                        @Override
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sun Aug 31 08:19:00 UTC 2025
    - 36.6K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/sso/aad/AzureAdAuthenticator.java

            if (logger.isDebugEnabled()) {
                logger.debug("Initialize {}", this.getClass().getSimpleName());
            }
            ComponentUtil.getSsoManager().register(this);
            groupCache = CacheBuilder.newBuilder().expireAfterWrite(groupCacheExpiry, TimeUnit.SECONDS).build();
        }
    
        @Override
        public LoginCredential getLoginCredential() {
            return LaRequestUtil.getOptionalRequest().map(request -> {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 28 09:13:08 UTC 2025
    - 37.3K bytes
    - Viewed (0)
Back to top