content

abstract infix fun String.content(builder: MediaTypeBuilder.() -> Unit)

Creates a content entry for this content type (the string receiver) and body (the builder configured by the lambda). See MediaTypeDsl for more information on what you can do in the lambda.


abstract val content: MutableList<Pair<String, Buildable<MediaType>>>

A "map" containing descriptions of potential payloads. The key is a media type or media type range and teh value describes it.

Note: this is provided as a MutableList in order to maintain the order content types were defined in.