Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for put (0.15 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. okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt

        assertThat(request.body).isNull()
      }
    
      @Test
      @Throws(IOException::class)
      fun put() {
        val request = fromArgs("-X", "PUT", "-d", "foo", "http://example.com").createRequest()
        assertThat(request.method).isEqualTo("PUT")
        assertThat(request.url.toString()).isEqualTo("http://example.com/")
        assertThat(request.body!!.contentLength()).isEqualTo(3)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/HttpMethod.kt

        (
          method == "POST" || method == "PATCH" || method == "PUT" ||
            method == "DELETE" || method == "MOVE"
        )
    
      @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs.
      fun requiresRequestBody(method: String): Boolean =
        (
          method == "POST" || method == "PUT" ||
            method == "PATCH" || method == "PROPPATCH" || // WebDAV
            method == "REPORT"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. 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)
  5. okhttp/src/test/java/okhttp3/RequestCommonTest.kt

    class RequestCommonTest {
      @Test
      fun constructorNormal() {
        val url = "https://example.com/".toHttpUrl()
        val body = "hello".toRequestBody()
        val headers = headersOf("User-Agent", "RequestTest")
        val method = "PUT"
        val request =
          Request(
            url = url,
            headers = headers,
            method = method,
            body = body,
          )
        assertThat(request.url).isEqualTo(url)
    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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top