Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for setType (0.26 sec)

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

          |... contents of file2.gif ...
          |--BbC04y--
          |
          |--AaB03x--
          |
          """.trimMargin().replace("\n", "\r\n")
        val body =
          MultipartBody.Builder("AaB03x")
            .setType(MultipartBody.FORM)
            .addFormDataPart("submit-name", "Larry")
            .addFormDataPart(
              "files",
              null,
              MultipartBody.Builder("BbC04y")
                .addPart(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

      private val client = OkHttpClient()
    
      fun run() {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        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),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          /**
           * Set the MIME type. Expected values for `type` are [MIXED] (the default), [ALTERNATIVE],
           * [DIGEST], [PARALLEL] and [FORM].
           */
          fun setType(type: MediaType) =
            apply {
              require(type.type == "multipart") { "multipart != $type" }
              this.type = type
            }
    
          /** Add a part to the body. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        }
      }
    
      /** Confirm that [MultipartBody] and [MultipartReader] can work together. */
      @Test fun `multipart round trip`() {
        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
            .addPart("Quick".toRequestBody("text/plain".toMediaType()))
            .addFormDataPart("color", "Brown")
            .addFormDataPart("animal", "fox.txt", "Fox".toRequestBody())
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  5. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirCompileTimeConstantEvaluator.kt

        private fun <T> ConstantValueKind<T>.toLiteralExpression(source: KtSourceElement?, value: Any?): FirLiteralExpression<T> =
            @Suppress("UNCHECKED_CAST")
            buildLiteralExpression(source, this, value as T, setType = false)
    
        private fun FirFunctionCall.getOriginalFunction(): FirCallableDeclaration? {
            val symbol: FirBasedSymbol<*>? = when (val reference = calleeReference) {
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Mar 20 14:53:27 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. docs/recipes.md

          private val client = OkHttpClient()
    
          fun run() {
            // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
            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))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      @Test
      fun multipartBodyBuilder() {
        val requestBody = "".toRequestBody(null)
        var builder: MultipartBody.Builder = MultipartBody.Builder()
        builder = MultipartBody.Builder("")
        builder = builder.setType("".toMediaType())
        builder = builder.addPart(requestBody)
        builder = builder.addPart(headersOf(), requestBody)
        builder = builder.addPart(null, requestBody)
        builder = builder.addFormDataPart("", "")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  8. okhttp/api/okhttp.api

    	public final fun addPart (Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Builder;
    	public final fun build ()Lokhttp3/MultipartBody;
    	public final fun setType (Lokhttp3/MediaType;)Lokhttp3/MultipartBody$Builder;
    }
    
    public final class okhttp3/MultipartBody$Companion {
    }
    
    public final class okhttp3/MultipartBody$Part {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  9. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt

        containingArrayType: KotlinType,
        analysisContext: Fe10AnalysisContext,
    ): List<KtAnnotationValue> = flatMap { constantValue: ConstantValue<*> ->
        val constantType = constantValue.getType(analysisContext.resolveSession.moduleDescriptor)
        if (analysisContext.builtIns.areSameArrayTypeIgnoringProjections(containingArrayType, constantType)) {
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Apr 25 07:15:56 GMT 2024
    - 33.2K bytes
    - Viewed (0)
  10. api/go1.txt

    pkg syscall (linux-386), const F_SETLKW64 ideal-int
    pkg syscall (linux-386), const F_SETOWN ideal-int
    pkg syscall (linux-386), const F_SETOWN_EX ideal-int
    pkg syscall (linux-386), const F_SETPIPE_SZ ideal-int
    pkg syscall (linux-386), const F_SETSIG ideal-int
    pkg syscall (linux-386), const F_SHLCK ideal-int
    pkg syscall (linux-386), const F_TEST ideal-int
    pkg syscall (linux-386), const F_TLOCK ideal-int
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top