You are responding to a request, your HTTP server must return something. The HTTP ’empty response’ response is 204 No Content
:
return ('', 204)
Note that returning a file to the browser is not an empty response, just different from a HTML response.
More Related Contents:
- Configure Flask dev server to be visible across the network
- json.dumps vs flask.jsonify
- Read file data without saving it in Flask
- What is the cause of the Bad Request Error when submitting form in Flask application?
- How to implement server push in Flask framework?
- Auto reloading python Flask app upon code changes
- Capture arbitrary path in Flask route
- Flask at first run: Do not use the development server in a production environment
- Execute a function after Flask returns response
- Return a download and rendered page in one Flask response
- Uploading multiple files with Flask
- Handling multiple requests in Flask
- How to integrate Flask & Scrapy?
- Display image stored as binary blob in template
- Remove unnecessary whitespace from Jinja rendered template
- Implementing Flask-Login with multiple User Classes
- Not able to parse a .csv file uploaded using Flask
- Import could not be resolved/could not be resolved from source Pylance in VS Code using Python 3.9.2 on Windows 10
- Is a SQLAlchemy query vulnerable to injection attacks?
- When scattering Flask Models, RuntimeError: ‘application not registered on db’ was raised
- How to render by Vue instead of Jinja
- How to send zip files in the python Flask framework?
- How do I get the user agent with Flask?
- Flask css not updating [closed]
- flask socketio emit to specific user
- Which SQLAlchemy column type should be used for binary data?
- Delete an uploaded file after downloading it from Flask
- Dynamic choices WTForms Flask SelectField
- Static files in Flask – robot.txt, sitemap.xml (mod_wsgi)
- flask sqlalchemy query with keyword as variable