MultiPartFormDataContent

class MultiPartFormDataContent(parts: List<PartData>, val boundary: String = generateBoundary(), val contentType: ContentType = ContentType.MultiPart.FormData.withParameter("boundary", boundary)) : OutgoingContent.WriteChannelContent

OutgoingContent for a multipart/form-data formatted request.

Example: Upload a file.

Parameters

parts

: form part data

Constructors

Link copied to clipboard
fun MultiPartFormDataContent(parts: List<PartData>, boundary: String = generateBoundary(), contentType: ContentType = ContentType.MultiPart.FormData.withParameter("boundary", boundary))

Functions

Link copied to clipboard
open fun <T : Any> getProperty(key: AttributeKey<T>): T?
Link copied to clipboard
open fun <T : Any> setProperty(key: AttributeKey<T>, value: T?)
Link copied to clipboard
open fun trailers(): Headers?
Link copied to clipboard
open suspend override fun writeTo(channel: ByteWriteChannel)

Properties

Link copied to clipboard
Link copied to clipboard
open override val contentLength: Long?
Link copied to clipboard
open override val contentType: ContentType
Link copied to clipboard
open val headers: Headers
Link copied to clipboard

Extensions

Link copied to clipboard

Generates a new OutgoingContent of the same abstract type but with OutgoingContent.headers transformed by the specified block.