# If /json route receives header "application/json" @app.route("/json", methods=['GET','POST']) def json(): app.logger.debug("JSON received...") app.logger.debug(request.json) if request.json: mydata = request.json # will be return "Thanks. Your age is %s" % mydata.get("age") else: return "no json received"