HttpBodyContentMultiPartFormData

class HttpBodyContentMultiPartFormData(val boundary: String = "---------------------------") : HttpBodyContent

Constructors

Link copied to clipboard
constructor(boundary: String = "---------------------------")

Types

Link copied to clipboard
inner class Entry(    val name: String,     val size: Long,     val getContent: suspend () -> AsyncInputStreamWithLength,     val fileName: String? = null,     val contentType: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
open override val contentType: String

Functions

Link copied to clipboard
suspend fun add(name: String, file: VfsFile, fileName: String? = file.baseName, contentType: String? = fileName?.let { MimeType.getByExtensionOrNull(PathInfo(fileName).extensionLC)?.mime })
suspend fun add(name: String, content: AsyncStream, fileName: String? = null, contentType: String? = null): HttpBodyContentMultiPartFormData
fun add(name: String, content: ByteArray, fileName: String? = null, contentType: String? = null): HttpBodyContentMultiPartFormData
fun add(    name: String,     size: Long,     getContent: suspend () -> AsyncInputStreamWithLength,     fileName: String? = null,     contentType: String? = null): HttpBodyContentMultiPartFormData
fun add(    name: String,     content: String,     contentCharset: Charset = UTF8,     fileName: String? = null,     contentType: String? = null): HttpBodyContentMultiPartFormData
Link copied to clipboard
open suspend override fun createAsyncStream(): AsyncInputStreamWithLength