Toon

Properties

Link copied to clipboard
open override val defaultContentType: ContentType

Functions

Link copied to clipboard
@JvmName(name = "streamAsA")
inline fun <T : Any> asA(input: InputStream): T
@JvmName(name = "stringAsA")
inline fun <T : Any> asA(input: String): T
@JvmName(name = "stringAsA")
fun <T : Any> String.asA(target: KClass<T>): T
open override fun <T : Any> asA(input: InputStream, target: KClass<T>): T
open override fun <T : Any> asA(input: String, target: KClass<T>): T
Link copied to clipboard
open override fun asFormatString(input: Any): String
Link copied to clipboard
open fun asInputStream(input: Any): InputStream
Link copied to clipboard
@JvmName(name = "autoRequest")
inline fun <OUT : Any> BiDiLensSpec<Request, String>.auto(): BiDiLensSpec<Request, OUT>
inline fun <T : Any> Body.Companion.auto(description: String? = null, contentNegotiation: ContentNegotiation = None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>
Link copied to clipboard
inline fun <T : Any> autoBody(description: String? = null, contentNegotiation: ContentNegotiation = None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>
Link copied to clipboard
inline fun <IN : Any, OUT : Any> autoLens(lens: BiDiLensSpec<IN, String>): BiDiLensSpec<IN, OUT>
Link copied to clipboard
inline fun <IN : Any, OUT : Any> convert(input: IN): OUT
Link copied to clipboard
inline fun <T : Any> WsMessage.json(t: T): WsMessage
Link copied to clipboard
inline fun <T : Any> HttpMessage.toon(): T

Convenience function to read an object as Toon from the message body.

inline fun <T : Any, R : HttpMessage> R.toon(t: T): R

Convenience function to write the object as Toon to the message body and set the content type.