from flask import request, current_app, Response from flask_classful import FlaskView class LogView(FlaskView): def post(self): # display received message current_app.logger.info(f"New message: {request.json['message']}") # return HTTP 204 - No content message return Response(status = 204)