added option to handle base64 encoded requests