bodyOrNull
Extension property to retrieve the body of the HttpMessage as a nullable object instead of an Optional
. Allowing to write message.bodyOrNull
instead of message.body.getOrNull()
.
Return
The body of the message as a nullable object, or null if the body is not present
Parameters
B
The type of the body