map
This function allows to create a new BodyHandler by transforming the output of the current BodyHandler.
Return
A new BodyHandler that applies the transformation function to the output of the current BodyHandler.
Example usage:
val ofInt: BodyHandler<Int> = ofString.map { it.toInt() }Content copied to clipboard
Parameters
f
The function to transform the output of the current BodyHandler.