Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for currentTimeMillis (0.23 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

    import org.junit.jupiter.api.extension.RegisterExtension
    
    class HeldCertificateTest {
      @RegisterExtension
      var platform = PlatformRule()
    
      @Test
      fun defaultCertificate() {
        val now = System.currentTimeMillis()
        val heldCertificate = HeldCertificate.Builder().build()
        val certificate = heldCertificate.certificate
        assertThat(certificate.getSubjectX500Principal().name, "self-signed")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.connection.RealConnection
    
    internal fun parseCookie(
      currentTimeMillis: Long,
      url: HttpUrl,
      setCookie: String,
    ): Cookie? = Cookie.parse(currentTimeMillis, url, setCookie)
    
    internal fun cookieToString(
      cookie: Cookie,
      forObsoleteRfc2965: Boolean,
    ): String = cookie.toString(forObsoleteRfc2965)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CacheTest.kt

       */
      @Test
      fun retainServedDateFormat() {
        // Serve a response with a non-standard date format that OkHttp supports.
        val lastModifiedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1))
        val servedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-2))
        val dateFormat: DateFormat = SimpleDateFormat("EEE dd-MMM-yyyy HH:mm:ss z", Locale.US)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/http2/Http2FlowControlConnectionListener.kt

     */
    class Http2FlowControlConnectionListener : ConnectionListener(), FlowControlListener {
      val start = System.currentTimeMillis()
    
      override fun receivingStreamWindowChanged(
        streamId: Int,
        windowCounter: WindowCounter,
        bufferSize: Long,
      ) {
        println("${System.currentTimeMillis() - start},$streamId,${windowCounter.unacknowledged},$bufferSize")
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

    import okhttp3.dnsoverhttps.DohProviders.providers
    import org.conscrypt.OpenSSLProvider
    
    private fun runBatch(
      dnsProviders: List<DnsOverHttps>,
      names: List<String>,
    ) {
      var time = System.currentTimeMillis()
      for (dns in dnsProviders) {
        println("Testing ${dns.url}")
        for (host in names) {
          print("$host: ")
          System.out.flush()
          try {
            val results = dns.lookup(host)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

        val realChain = chain as RealInterceptorChain
        val exchange = realChain.exchange!!
        val request = realChain.request
        val requestBody = request.body
        val sentRequestMillis = System.currentTimeMillis()
    
        var invokeStartEvent = true
        var responseBuilder: Response.Builder? = null
        var sendRequestException: IOException? = null
        try {
          exchange.writeRequestHeaders(request)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

        init {
          ecdsa256()
        }
    
        /**
         * Sets the certificate to be valid in ```[notBefore..notAfter]```. Both endpoints are specified
         * in the format of [System.currentTimeMillis]. Specify -1L for both values to use the default
         * interval, 24 hours starting when the certificate is created.
         */
        fun validityInterval(
          notBefore: Long,
          notAfter: Long,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/CallTest.kt

            .addHeader("content-type: text/plain")
            .addHeader("content-length", "3")
            .build(),
        )
        val sentAt = System.currentTimeMillis()
        val recordedResponse = executeSynchronously("/", "User-Agent", "SyncApiTest")
        val receivedAt = System.currentTimeMillis()
        recordedResponse.assertCode(200)
          .assertSuccessful()
          .assertHeaders(
            Headers.Builder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val call = chain.call()
        val cacheCandidate = cache?.get(chain.request().requestForCache())
    
        val now = System.currentTimeMillis()
    
        val strategy = CacheStrategy.Factory(now, chain.request(), cacheCandidate).compute()
        val networkRequest = strategy.networkRequest
        val cacheResponse = strategy.cacheResponse
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Response.kt

      /**
       * Returns a [timestamp][System.currentTimeMillis] taken immediately before OkHttp
       * transmitted the initiating request over the network. If this response is being served from the
       * cache then this is the timestamp of the original request.
       */
      @get:JvmName("sentRequestAtMillis") val sentRequestAtMillis: Long,
      /**
       * Returns a [timestamp][System.currentTimeMillis] taken immediately after OkHttp
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
Back to top