replace blob usage with base64encode for basic auth headers