get rid of "DeprecationWarning: The mimetype keyword argument is deprecated, use content_type instead"