Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for addFormDataPart (0.09 sec)

  1. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

            .setType(MultipartBody.FORM)
            .addFormDataPart(
              "field with spaces",
              "filename with spaces.txt",
              "okay".toRequestBody("text/plain; charset=utf-8".toMediaType()),
            )
            .addFormDataPart("field with \"", "\"")
            .addFormDataPart("field with %22", "%22")
            .addFormDataPart("field with \u007e", "Alpha")
            .build()
        val buffer = Buffer()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
            .addPart("Quick".toRequestBody("text/plain".toMediaType()))
            .addFormDataPart("color", "Brown")
            .addFormDataPart("animal", "fox.txt", "Fox".toRequestBody())
            .build()
    
        val bodyContent = Buffer()
        body.writeTo(bodyContent)
    
        val reader = MultipartReader(bodyContent, "boundary")
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          }
    
          /** Add a form data part to the body. */
          fun addFormDataPart(
            name: String,
            value: String,
          ) = apply {
            addPart(Part.createFormData(name, value))
          }
    
          /** Add a form data part to the body. */
          fun addFormDataPart(
            name: String,
            filename: String?,
            body: RequestBody,
          ) = apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. docs/recipes.md

            val requestBody = MultipartBody.Builder()
                .setType(MultipartBody.FORM)
                .addFormDataPart("title", "Square Logo")
                .addFormDataPart("image", "logo-square.png",
                    File("docs/images/logo-square.png").asRequestBody(MEDIA_TYPE_PNG))
                .build()
    
            val request = Request.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        builder = builder.addPart(requestBody)
        builder = builder.addPart(headersOf(), requestBody)
        builder = builder.addPart(null, requestBody)
        builder = builder.addFormDataPart("", "")
        builder = builder.addFormDataPart("", "", requestBody)
        builder = builder.addFormDataPart("", null, requestBody)
        builder = builder.addPart(MultipartBody.Part.create(requestBody))
        val multipartBody: MultipartBody = builder.build()
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
Back to top