All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hexagonkt.http.model.HttpPart.kt Maven / Gradle / Ivy

package com.hexagonkt.http.model

data class HttpPart (
    val name: String,
    override val body: Any,
    override val headers: Headers = Headers(),
    override val contentType: ContentType? = null,
    val size: Long = -1L,
    val submittedFileName: String? = null
) : HttpBase {

    constructor(name: String, value: String) :
        this(name, value, size = value.toByteArray().size.toLong())

    constructor(name: String, body: ByteArray, submittedFileName: String) :
        this(name, body, size = body.size.toLong(), submittedFileName = submittedFileName)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy