MCPcopy Create free account
hub / github.com/StackStorm/st2 / echo

Method echo

contrib/examples/sensors/echo_flask_app.py:39–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 1

dispatchMethod · 0.45

Tested by

no test coverage detected