Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 58 for newBuilder (1.06 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

          "Request header not permitted: 'Sec-WebSocket-Extensions'",
        )
      }
    
      @Test
      fun webSocketAndApplicationInterceptors() {
        val interceptedCount = AtomicInteger()
        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                assertThat(chain.request().body).isNull()
                val response = chain.proceed(chain.request())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/RequestCommonTest.kt

      }
    
      @Test
      fun newBuilderUrlResetsUrl() {
        val requestWithoutCache = Request.Builder().url("http://localhost/api").build()
        val builtRequestWithoutCache = requestWithoutCache.newBuilder().url("http://localhost/api/foo").build()
        assertThat(builtRequestWithoutCache.url).isEqualTo(
          "http://localhost/api/foo".toHttpUrl(),
        )
        val requestWithCache =
          Request.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

            .connectTimeout(60, TimeUnit.SECONDS) // Deliberately exacerbate slow fallbacks.
            .dns { dnsResults }
            .fastFallback(true)
            .build()
        url =
          serverIpv4.url("/")
            .newBuilder()
            .host("localhost")
            .build()
      }
    
      @AfterEach
      internal fun tearDown() {
        serverIpv4.shutdown()
        serverIpv6.shutdown()
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/main/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)
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  5. okhttp/src/test/java/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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Request.kt

       * [newBuilder].
       *
       * @suppress this method breaks Dokka! https://github.com/Kotlin/dokka/issues/2473
       */
      fun tag(): Any? = tag<Any>()
    
      /**
       * Returns the tag attached with [type] as a key, or null if no tag is attached with that
       * key.
       */
      fun <T> tag(type: Class<out T>): T? = tag(type.kotlin)
    
      fun newBuilder(): Builder = Builder(this)
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val encodedFragment: String? = httpUrl.encodedFragment
        val fragment: String? = httpUrl.fragment
        val redact: String = httpUrl.redact()
        var builder: HttpUrl.Builder = httpUrl.newBuilder()
        var resolveBuilder: HttpUrl.Builder? = httpUrl.newBuilder("")
        val topPrivateDomain: String? = httpUrl.topPrivateDomain()
        val resolve: HttpUrl? = httpUrl.resolve("")
        val getFromUrl: HttpUrl? = URL("").toHttpUrlOrNull()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  8. okhttp/src/test/java/okhttp3/RequestTest.kt

      }
    
      @Test
      fun newBuilderUrlResetsUrl() {
        val requestWithoutCache = Request.Builder().url("http://localhost/api").build()
        val builtRequestWithoutCache = requestWithoutCache.newBuilder().url("http://localhost/api/foo").build()
        assertThat(builtRequestWithoutCache.url).isEqualTo(
          "http://localhost/api/foo".toHttpUrl(),
        )
        val requestWithCache =
          Request.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  9. maven-api-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultVersionResolver.java

                                        && versioning.getSnapshot().getBuildNumber() > 0) {
                                    versioning = Versioning.newBuilder()
                                            .lastUpdated(versioning.getLastUpdated())
                                            .snapshot(Snapshot.newBuilder()
                                                    .localCopy(true)
                                                    .build())
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 20.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

              }
              newRoutePlanner = false
              continue
            }
    
            // Clear out downstream interceptor's additional request headers, cookies, etc.
            response =
              response.newBuilder()
                .request(request)
                .priorResponse(priorResponse?.stripBody())
                .build()
    
            val exchange = call.interceptorScopedExchange
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
Back to top