Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for Put (0.14 sec)

  1. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

        val cookieStrings = mutableListOf<String>()
        for (cookie in cookies) {
          cookieStrings.add(cookieToString(cookie, true))
        }
        val multimap = mapOf("Set-Cookie" to cookieStrings)
        try {
          cookieHandler.put(url.toUri(), multimap)
        } catch (e: IOException) {
          Platform.get().log("Saving cookies failed for " + url.resolve("/...")!!, WARN, e)
        }
      }
    
      override fun loadForRequest(url: HttpUrl): List<Cookie> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  3. 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)
  4. okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt

    fun Request.Builder.commonDelete(body: RequestBody?): Request.Builder = method("DELETE", body)
    
    fun Request.Builder.commonPut(body: RequestBody): Request.Builder = method("PUT", body)
    
    fun Request.Builder.commonPatch(body: RequestBody): Request.Builder = method("PATCH", body)
    
    fun Request.Builder.commonMethod(
      method: String,
      body: RequestBody?,
    ): Request.Builder =
      apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

                  ConnectResult(plan, throwable = e)
                }
              // Only post a result if this hasn't since been canceled.
              if (plan in tcpConnectsInFlight) {
                connectResults.put(connectResult)
              }
              return -1L
            }
          },
        )
        return null
      }
    
      private fun awaitTcpConnect(
        timeout: Long,
        unit: TimeUnit,
      ): ConnectResult? {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

            taskRunner = taskRunner,
            connectionPool = pool,
            route = route,
            socket = Socket(),
            idleAtNs = idleAtNanos,
          )
        result.withLock { pool.put(result) }
        return result
      }
    
      fun newConnectionPool(
        taskRunner: TaskRunner = this.taskRunner,
        maxIdleConnections: Int = Int.MAX_VALUE,
        routePlanner: RoutePlanner? = null,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

          val parameterValue =
            when {
              startsWith('"'.code.toByte()) -> readQuotedString()
              else -> readToken()
            } ?: return // Expected a value.
    
          val replaced = parameters.put(peek, parameterValue)
          peek = null
          if (replaced != null) return // Unexpected duplicate parameter.
          if (!skipCommasAndWhitespace() && !exhausted()) return // Expected ',' or EOF.
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. 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)
Back to top