Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Parts (1.11 sec)

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

          )
    
        assertThat(parts.nextPart()).isNotNull()
        assertThat(parts.nextPart()).isNull()
        assertThat(parts.nextPart()).isNull()
      }
    
      @Test fun `empty source`() {
        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer(),
          )
    
        assertFailsWith<EOFException> {
          parts.nextPart()
        }
      }
    
    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)
  2. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

      request.url(url)
    
      data?.let {
        request.method(requestMethod, it.toRequestBody(mediaType()))
      }
    
      for (header in headers.orEmpty()) {
        val parts = header.split(':', limit = 2)
        if (!isSpecialHeader(parts[0])) {
          request.header(parts[0], parts[1])
        }
      }
      referer?.let {
        request.header("Referer", it)
      }
      request.header("User-Agent", userAgent)
    
      return request.build()
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    /**
     * Reads a stream of [RFC 2046][rfc_2046] multipart body parts. Callers read parts one-at-a-time
     * until [nextPart] returns null. After calling [nextPart] any preceding parts should not be read.
     *
     * Typical use loops over the parts in sequence:
     *
     * ```kotlin
     * val response: Response = call.execute()
     * val multipartReader = MultipartReader(response.body!!)
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

        level = DeprecationLevel.ERROR,
      )
      fun size(): Int = size
    
      @JvmName("-deprecated_parts")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "parts"),
        level = DeprecationLevel.ERROR,
      )
      fun parts(): List<Part> = parts
    
      @Throws(IOException::class)
      override fun contentLength(): Long {
        var result = contentLength
        if (result == -1L) {
    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)
  5. okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt

            if (line.isEmpty() || line.startsWith("#")) continue
    
            var i = 0
            val parts = line.split(Regex(" ")).toTypedArray()
    
            val element = WebPlatformUrlTestData()
            element.input = unescape(parts[i++])
    
            val base = if (i < parts.size) parts[i++] else null
            element.base =
              when {
                base == null || base.isEmpty() -> list[list.size - 1].base
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        assertThat(body.boundary).isEqualTo("123")
        assertThat(body.type).isEqualTo(MultipartBody.MIXED)
        assertThat(body.contentType().toString())
          .isEqualTo("multipart/mixed; boundary=123")
        assertThat(body.parts.size).isEqualTo(1)
        assertThat(body.contentLength()).isEqualTo(33L)
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(body.contentLength()).isEqualTo(buffer.size)
    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)
  7. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val type: MediaType = multipartBody.type()
        val boundary: String = multipartBody.boundary()
        val size: Int = multipartBody.size()
        val parts: List<MultipartBody.Part> = multipartBody.parts()
      }
    
      @Test @Disabled
      fun multipartBodyPart() {
        val multipartBody: MultipartBody = MultipartBody.Builder().build()
        val part: MultipartBody.Part = multipartBody.part(0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

        }
    
        when {
          secondSpace != -1 && firstSpace == CLEAN.length && line.startsWith(CLEAN) -> {
            val parts =
              line.substring(secondSpace + 1)
                .split(' ')
            entry.readable = true
            entry.currentEditor = null
            entry.setLengths(parts)
          }
    
          secondSpace == -1 && firstSpace == DIRTY.length && line.startsWith(DIRTY) -> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val type: MediaType = multipartBody.type
        val boundary: String = multipartBody.boundary
        val size: Int = multipartBody.size
        val parts: List<MultipartBody.Part> = multipartBody.parts
        val part: MultipartBody.Part = multipartBody.part(0)
        val contentType: MediaType = multipartBody.contentType()
        val contentLength: Long = multipartBody.contentLength()
    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)
  10. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

     * }
     * ```
     *
     * which prints:
     *
     * ```
     * q: cute #puppies
     * f: images
     * ```
     *
     * In addition to composing URLs from their component parts and decomposing URLs into their
     * component parts, this class implements relative URL resolution: what address you'd reach by
     * clicking a relative link on a specified page. For example:
     *
     * ```java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
Back to top