Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Let (0.14 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

              // Request body headers are only present when installed as a network interceptor. When not
              // already present, force them to be included (if available) so their values are known.
              requestBody.contentType()?.let {
                if (headers["Content-Type"] == null) {
                  logger.log("Content-Type: $it")
                }
              }
              if (requestBody.contentLength() != -1L) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

              val coordinatorTask = waitingCoordinatorTask ?: error("no coordinator waiting")
              currentTask = coordinatorTask
              taskRunner.condition.signalAll()
            }
          }
    
        // Let the coordinator process its interruption.
        runTasks()
      }
    
      /** Ask a single task to proceed. Used by the test thread only. */
      fun runNextTask() {
        taskRunner.assertThreadDoesntHoldLock()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

      internal val fileSystem: FileSystem =
        object : ForwardingFileSystem(fileSystem) {
          override fun sink(
            file: Path,
            mustCreate: Boolean,
          ): Sink {
            file.parent?.let {
              createDirectories(it)
            }
            return super.sink(file, mustCreate)
          }
        }
    
      /** The maximum number of bytes that this cache should use to store its data. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

      @Synchronized private fun initUncaughtException(throwable: Throwable) {
        if (uncaughtException == null) {
          uncaughtException = throwable
        }
      }
    
      fun ensureAllConnectionsReleased() {
        testClient?.let {
          val connectionPool = it.connectionPool
    
          connectionPool.evictAll()
          if (connectionPool.connectionCount() > 0) {
            // Minimise test flakiness due to possible race conditions with connections closing.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        a2.cancel()
        a3.cancel()
        assertThat(dispatcher.runningCalls())
          .containsExactlyInAnyOrder(a1, a2)
        assertThat(dispatcher.queuedCalls()).isEmpty()
    
        // Let the calls finish.
        waiting.countDown()
        t1.join()
        t2.join()
    
        // Now we should have 0 running calls and 0 queued calls.
        assertThat(dispatcher.runningCallsCount()).isEqualTo(0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        bytesIn.writeByte(0x18)
        hpackReader!!.readHeaders()
        assertThat(hpackReader!!.headerCount).isEqualTo(1)
      }
    
      /** Header table backing array is initially 8 long, let's ensure it grows.  */
      @Test
      fun dynamicallyGrowsBeyond64Entries() {
        // Lots of headers need more room!
        hpackReader = Hpack.Reader(bytesIn, 16384, 4096)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

              // We have the connection and it's in the pool. Let request2 proceed to make a connection.
              latch2.countDown()
            }
          }
        val request2Listener: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
              inetSocketAddress: InetSocketAddress,
              proxy: Proxy,
            ) {
              // Let request1 proceed to make a connection.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

        results: MutableList<InetAddress>,
        failures: MutableList<Exception>,
        type: Int,
      ) {
        val request = buildRequest(hostname, type)
        val response = getCacheOnlyResponse(request)
    
        response?.let { processResponse(it, hostname, results, failures) } ?: networkRequests.add(
          client.newCall(request),
        )
      }
    
      private fun executeRequests(
        hostname: String,
        networkRequests: List<Call>,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

            buffer.write(source, length.toLong())
          }
        }
        while (!buffer.exhausted()) {
          var publicSuffix = buffer.readUtf8LineStrict()
          if (publicSuffix.contains("*")) {
            // A wildcard rule, let's replace the wildcard with a value.
            publicSuffix = publicSuffix.replace("\\*".toRegex(), "square")
          }
          assertThat(publicSuffixDatabase.getEffectiveTldPlusOne(publicSuffix)).isNull()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

        plan0.yieldBeforeTcpConnectReturns = true // Yield so we get a chance to take plan1...
        val plan1 = routePlanner.addPlan()
        plan1.connectState = TLS_CONNECTED
        plan1.yieldBeforePlanReturns = true // ... but let plan 0 connect before we act upon it.
    
        taskRunner.newQueue().execute("connect") {
          val result0 = finder.find()
          assertThat(result0).isEqualTo(plan0.connection)
        }
    
        taskFaker.runTasks()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
Back to top