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

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

Go to download

HTTP classes. These classes are shared among the HTTP client and the HTTP server.

The newest version!
package com.hexagonkt.http.model

data class FormParameters(
    val httpFields: Map
) : Map by httpFields {

    constructor(fields: List) : this(fields.associateBy { it.name })

    constructor(vararg fields: FormParameter) : this(fields.toList())

    operator fun plus(element: FormParameter): FormParameters =
        copy(httpFields = httpFields + (element.name to element))

    operator fun plus(element: FormParameters): FormParameters =
        copy(httpFields = httpFields + element.httpFields)

    operator fun minus(name: String): FormParameters =
        copy(httpFields = httpFields - name)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy