FormPart

data class FormPart(val name: String?, val filename: String? = null, val contentType: TracyContentType? = null, val headers: Map<String, String> = emptyMap(), val content: ByteArray)(source)

Represents a part of a form-data entity, typically used in multipart requests.

Constructors

Link copied to clipboard
constructor(name: String?, filename: String? = null, contentType: TracyContentType? = null, headers: Map<String, String> = emptyMap(), content: ByteArray)

Properties

Link copied to clipboard

The raw content of the form part.

Link copied to clipboard

The MIME type of the content associated with this part. Can be null if not specified.

Link copied to clipboard

The filename associated with this part, commonly used for file uploads. Can be null if not applicable.

Link copied to clipboard

additional headers present in the form part (e.g., Content-Transfer-Encoding, Content-ID, custom headers).

Link copied to clipboard
val name: String?

The name of the form field associated with this part. Can be null if not provided.

Functions

Link copied to clipboard
open override fun toString(): String