dataPart

inline fun dataPart(init: DataPartBuilder.() -> Unit): DataPart(source)

Creates a new DataPart using the DSL builder.

Example:

val dataPart = dataPart {
put("name", "John")
put("age", 30)
put("address", mapOf("city" to "New York", "zip" to "10001"))
}

Return

A new DataPart instance

Parameters

init

The lambda to configure the data part


Creates a new DataPart using the Java-friendly Consumer.

Return

A new DataPart instance

Parameters

init

The consumer to configure the data part