http4k / org.http4k.core / Body
Body
interface Body :
Closeable
If this Body is NOT being returned to the caller (via a Server implementation or otherwise), close() should be
called.
Properties
Companion Object Properties
Companion Object Functions
Extension Functions
Companion Object Extension Functions
Name |
Summary |
binary |
fun Body.Companion.binary(contentType: ContentType , description: String ? = null, contentNegotiation: ContentNegotiation = None): <ERROR CLASS> |
multipartForm |
fun Body.Companion.multipartForm(validator: Validator , vararg parts: Lens < MultipartForm , *>, defaultBoundary: String = MULTIPART_BOUNDARY, diskThreshold: Int = DEFAULT_DISK_THRESHOLD, contentTypeFn: ( String ) -> ContentType = ::MultipartFormWithBoundary): BiDiBodyLensSpec < MultipartForm > |
nonEmptyString |
fun Body.Companion.nonEmptyString(contentType: ContentType , description: String ? = null, contentNegotiation: ContentNegotiation = None): <ERROR CLASS> |
regex |
fun Body.Companion.regex(pattern: String , group: Int = 1, contentType: ContentType = ContentType.TEXT_PLAIN, description: String ? = null, contentNegotiation: ContentNegotiation = None): <ERROR CLASS> |
string |
fun Body.Companion.string(contentType: ContentType , description: String ? = null, contentNegotiation: ContentNegotiation = None): <ERROR CLASS> |
viewModel |
fun Body.Companion.viewModel(renderer: TemplateRenderer , contentType: ContentType ): <ERROR CLASS> |
webForm |
fun Body.Companion.webForm(validator: Validator , vararg formFields: Lens < WebForm , *>): BiDiBodyLensSpec < WebForm > |
Inheritors
Name |
Summary |
MemoryBody |
Represents a body that is backed by an in-memory ByteBuffer. Closing this has no effect.data class MemoryBody : Body |
MultipartFormBody |
Represents a Multi-part that is backed by a stream, which should be closed after handling the content. The gotchas which apply to StreamBody also apply here..data class MultipartFormBody : Body , Closeable |
StreamBody |
Represents a body that is backed by a (lazy) InputStream. Operating with StreamBody has a number of potential gotchas:class StreamBody : Body |