Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 75 for mediaType (0.3 sec)

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

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.io.IOException
    import java.nio.charset.Charset
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.internal.toImmutableList
    import okhttp3.internal.url.FORM_ENCODE_SET
    import okhttp3.internal.url.canonicalizeWithCharset
    import okhttp3.internal.url.percentDecode
    import okio.Buffer
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/internal.kt

        cipherSuitesAsString.intersect(socketEnabledCipherSuites, CipherSuite.ORDER_BY_NAME)
      } else {
        socketEnabledCipherSuites
      }
    
    internal fun MediaType?.chooseCharset(): Pair<Charset, MediaType?> {
      var charset: Charset = Charsets.UTF_8
      var finalContentType: MediaType? = this
      if (this != null) {
        val resolvedCharset = this.charset()
        if (resolvedCharset == null) {
          charset = Charsets.UTF_8
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartBody.kt

     */
    @Suppress("NAME_SHADOWING")
    class MultipartBody internal constructor(
      private val boundaryByteString: ByteString,
      @get:JvmName("type") val type: MediaType,
      @get:JvmName("parts") val parts: List<Part>,
    ) : RequestBody() {
      private val contentType: MediaType = "$type; boundary=$boundary".toMediaType()
      private var contentLength = -1L
    
      @get:JvmName("boundary")
      val boundary: String
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  4. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

     * limitations under the License.
     */
    @file:Suppress("ktlint:standard:filename")
    
    package okhttp3.curl.internal
    
    import java.io.IOException
    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaTypeOrNull
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.curl.Main
    import okhttp3.internal.http.StatusLine
    import okio.sink
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  5. okhttp/api/android/okhttp.api

    	public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/CommonRequestBodyTest.kt

    class CommonRequestBodyTest {
      @Test
      fun correctContentType() {
        val body = "Body"
        val requestBody = body.toRequestBody(MediaType("text/plain", "text", "plain", arrayOf()))
    
        val contentType = requestBody.contentType()!!
    
        assertThat(contentType.mediaType).isEqualTo("text/plain; charset=utf-8")
        assertThat(contentType.parameter("charset")).isEqualTo("utf-8")
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt

    import okio.BufferedSink
    
    open class ForwardingRequestBody(
      delegate: RequestBody?,
    ) : RequestBody() {
      private val delegate: RequestBody
    
      fun delegate(): RequestBody = delegate
    
      override fun contentType(): MediaType? = delegate.contentType()
    
      @Throws(IOException::class)
      override fun contentLength(): Long = delegate.contentLength()
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt

     */
    package okhttp3.internal.duplex
    
    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.concurrent.TimeUnit.SECONDS
    import okhttp3.MediaType
    import okhttp3.RequestBody
    import okio.BufferedSink
    import org.junit.jupiter.api.Assertions.assertTrue
    
    /** A duplex request body that keeps the provided sinks so they can be written to later.  */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/api/okhttp-dnsoverhttps.api

    	public final fun url (Lokhttp3/HttpUrl;)Lokhttp3/dnsoverhttps/DnsOverHttps$Builder;
    }
    
    public final class okhttp3/dnsoverhttps/DnsOverHttps$Companion {
    	public final fun getDNS_MESSAGE ()Lokhttp3/MediaType;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 27 15:23:43 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/kt/PostFile.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.File
    import java.io.IOException
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.asRequestBody
    
    class PostFile {
      private val client = OkHttpClient()
    
      fun run() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top