invirt.http4k.views.MapView.kt Maven / Gradle / Ivy
package invirt.http4k.views
import org.http4k.core.Response
class MapView(
map: Map,
private val view: String
) : ViewResponse(view), Map by map {
override fun toString(): String {
return view
}
}
infix fun Map.withView(view: String): Response = MapView(this, view).ok()
infix fun Pair.withView(view: String): Response = mapOf(this).withView(view)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy