bodyToBytes
Convert an object to a byte array. If the body class is not supported, it throws a runtime exception. IMPORTANT: Must be enclosed on a try/catch block to check runtime errors.
Return
The bytes of the supplied object.
Parameters
body
Object to convert to bytes.