Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for puts (0.12 sec)

  1. docs/contribute/concurrency.md

    Since HTTP requests frequently happen in parallel, connection pooling must be thread-safe.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CookiesTest.kt

                    "a=\"android\";\$Path=\"/\";\$Domain=\"${serverUrl.host}\"; " +
                    "b=\"banana\";\$Path=\"/\";\$Domain=\"${serverUrl.host}\"",
                ),
            )
    
            override fun put(
              uri: URI,
              map: Map<String, List<String>>,
            ) {
            }
          }
        client =
          client.newBuilder()
            .cookieJar(JavaNetCookieJar(androidCookieHandler))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        // 3 different lookups in the connection pool!
        val pooled3 = routePlanner.planReusePooledConnection(this, routes)
        if (pooled3 != null) return pooled3.connection
    
        connection.withLock {
          connectionPool.put(connection)
          user.acquireConnectionNoEvents(connection)
        }
    
        user.connectionAcquired(connection)
        user.connectionConnectionAcquired(connection)
        return connection
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Cache.kt

        val response = entry.response(snapshot)
        if (!entry.matches(request, response)) {
          response.body.closeQuietly()
          return null
        }
    
        return response
      }
    
      internal fun put(response: Response): CacheRequest? {
        val requestMethod = response.request.method
    
        if (HttpMethod.invalidatesCache(response.request.method)) {
          try {
            remove(response.request)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

      }
    
      @Test fun taskFailsWithUncheckedException() {
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(100)) {
          log.put("failing task running")
          throw RuntimeException("boom!")
        }
    
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(200)) {
          log.put("normal task running")
          return@schedule -1L
        }
    
        queue.idleLatch().await(500, TimeUnit.MILLISECONDS)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/RequestTest.kt

        assertThat(post.method).isEqualTo("POST")
        assertThat(post.body).isEqualTo(body)
    
        val put = Request.Builder().url("http://localhost/api").put(body).build()
        assertThat(put.method).isEqualTo("PUT")
        assertThat(put.body).isEqualTo(body)
    
        val patch = Request.Builder().url("http://localhost/api").patch(body).build()
        assertThat(patch.method).isEqualTo("PATCH")
    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)
  7. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

          contentLength: Long = -1L,
        ): ResponseBody = commonAsResponseBody(contentType, contentLength)
    
        @JvmStatic
        @Deprecated(
          message = "Moved to extension function. Put the 'content' argument first to fix Java",
          replaceWith =
            ReplaceWith(
              expression = "content.toResponseBody(contentType)",
              imports = ["okhttp3.ResponseBody.Companion.toResponseBody"],
    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)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

              val editCountBefore = editCount
              yieldUntil { nanoTime >= waitUntil || editCount > editCountBefore }
            }
          }
        }
    
        override fun put(element: T) {
          taskRunner.lock.withLock {
            delegate.put(element)
            editCount++
          }
        }
    
        override fun iterator() = error("unsupported")
    
        override fun offer(e: T) = error("unsupported")
    
    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)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

            val clientProviderClass = Class.forName("$alpnClassName\$ClientProvider", true, null)
            val serverProviderClass = Class.forName("$alpnClassName\$ServerProvider", true, null)
            val putMethod = alpnClass.getMethod("put", SSLSocket::class.java, providerClass)
            val getMethod = alpnClass.getMethod("get", SSLSocket::class.java)
            val removeMethod = alpnClass.getMethod("remove", SSLSocket::class.java)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

          if (response.promisesBody() && CacheStrategy.isCacheable(response, cacheNetworkRequest)) {
            // Offer this request to the cache.
            val cacheRequest = cache.put(response.newBuilder().request(cacheNetworkRequest).build())
            return cacheWritingResponse(cacheRequest, response).also {
              if (cacheResponse != null) {
                // This will log a conditional cache miss only.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top