Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for addEncoded (0.16 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/FormBodyTest.kt

        val out = Buffer()
        body.writeTo(out)
        assertThat(out.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun addEncoded() {
        val body =
          FormBody
            .Builder()
            .addEncoded("a+=& b", "c+=& d")
            .addEncoded("e+=& f", "g+=& h")
            .addEncoded("%25", "%25")
            .build()
        val expected = "a+%3D%26+b=c+%3D%26+d&e+%3D%26+f=g+%3D%26+h&%25=%25"
        val out = Buffer()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/FormBody.kt

                encodeSet = FORM_ENCODE_SET,
                // Plus is encoded as `%2B`, space is encoded as plus.
                plusIsSpace = false,
                charset = charset,
              )
          }
    
          fun addEncoded(
            name: String,
            value: String,
          ) = apply {
            names +=
              name.canonicalizeWithCharset(
                encodeSet = FORM_ENCODE_SET,
                alreadyEncoded = true,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (0)
Back to top