Support switch for trim and base64 encoding (now allow text instead)