Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for formBody (0.11 sec)

  1. okhttp/src/main/kotlin/okhttp3/FormBody.kt

                encodeSet = FORM_ENCODE_SET,
                alreadyEncoded = true,
                plusIsSpace = true,
                charset = charset,
              )
          }
    
          fun build(): FormBody = FormBody(names, values)
        }
    
      companion object {
        private val CONTENT_TYPE: MediaType = "application/x-www-form-urlencoded".toMediaType()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/PostForm.java

    package okhttp3.recipes;
    
    import java.io.IOException;
    import okhttp3.FormBody;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    
    public final class PostForm {
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        RequestBody formBody = new FormBody.Builder()
            .add("search", "Jurassic Park")
            .build();
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.4K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/PostForm.kt

     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.FormBody
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class PostForm {
      private val client = OkHttpClient()
    
      fun run() {
        val formBody =
          FormBody.Builder()
            .add("search", "Jurassic Park")
            .build()
        val request =
          Request(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun formBody() {
        val formBody: FormBody = FormBody.Builder().build()
        val size: Int = formBody.size
        val encodedName: String = formBody.encodedName(0)
        val name: String = formBody.name(0)
        val encodedValue: String = formBody.encodedValue(0)
        val value: String = formBody.value(0)
        val contentType: MediaType = formBody.contentType()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/FormBodyTest.kt

      fun encodedPair() {
        val body =
          FormBody.Builder()
            .add("sim", "ple")
            .build()
        val expected = "sim=ple"
        assertThat(body.contentLength()).isEqualTo(expected.length.toLong())
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun encodeMultiplePairs() {
        val body =
          FormBody.Builder()
            .add("sim", "ple")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val path: String = cookie.path()
        val httpOnly: Boolean = cookie.httpOnly()
        val secure: Boolean = cookie.secure()
      }
    
      @Test @Disabled
      fun formBody() {
        val formBody: FormBody = FormBody.Builder().build()
        val size: Int = formBody.size()
      }
    
      @Test @Disabled
      fun handshake() {
        val handshake: Handshake =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. docs/recipes.md

    Use `FormBody.Builder` to build a request body that works like an HTML `<form>` tag. Names and values will be encoded using an HTML-compatible form URL encoding.
    
    === ":material-language-kotlin: Kotlin"
        ```kotlin
          private val client = OkHttpClient()
    
          fun run() {
            val formBody = FormBody.Builder()
                .add("search", "Jurassic Park")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  8. docs/changelogs/upgrading_to_okhttp_4.md

     * **CipherSuite**: javaName
     * **ConnectionSpec**: cipherSuites, supportsTlsExtensions, tlsVersions
     * **Cookie**: domain, expiresAt, hostOnly, httpOnly, name, path, persistent, value
     * **Dispatcher**: executorService
     * **FormBody**: size
     * **Handshake**: cipherSuite, localCertificates, localPrincipal, peerCertificates, peerPrincipal,
       tlsVersion
     * **HandshakeCertificates**: keyManager, trustManager
     * **Headers**: size
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  9. okhttp/api/okhttp.api

    }
    
    public final class okhttp3/FormBody$Builder {
    	public fun <init> ()V
    	public fun <init> (Ljava/nio/charset/Charset;)V
    	public synthetic fun <init> (Ljava/nio/charset/Charset;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
    	public final fun add (Ljava/lang/String;Ljava/lang/String;)Lokhttp3/FormBody$Builder;
    	public final fun addEncoded (Ljava/lang/String;Ljava/lang/String;)Lokhttp3/FormBody$Builder;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  10. docs/changelogs/changelog_3x.md

        as modern web browsers.
    
     *  **Form and Multipart bodies are now modeled.** We've replaced the opaque
        `FormEncodingBuilder` with the more powerful `FormBody` and
        `FormBody.Builder` combo. Similarly we've upgraded `MultipartBuilder` into
        `MultipartBody`, `MultipartBody.Part`, and `MultipartBody.Builder`.
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 14:55:54 UTC 2022
    - 50.8K bytes
    - Viewed (0)
Back to top