ensure body is set before parsing it