()
| 37 | def run(self): |
| 38 | @self._app.route(self._path, methods=["POST"]) |
| 39 | def echo(): |
| 40 | payload = request.get_json(force=True) |
| 41 | self._sensor_service.dispatch( |
| 42 | trigger="examples.echoflasksensor", payload=payload |
| 43 | ) |
| 44 | return jsonify( |
| 45 | request.get_json(force=True), status=200, mimetype="application/json" |
| 46 | ) |
| 47 | |
| 48 | self._log.info( |
| 49 | "Listening for payload on http://{}:{}{}".format( |