File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33"""A simple bot script, built on Flask.
44
5- This sample script leverages the Flask web service micro-framework
6- (see http://flask.pocoo.org/). By default the web server will be reachable at
7- port 5000 you can change this default if desired (see `flask_app.run(...)`).
5+ This sample script leverages the Flask web service micro-framework
6+ (see http://flask.pocoo.org/). By default the web server will be reachable at
7+ port 5000 you can change this default if desired (see `flask_app.run(...)`).
88
9- ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server
9+ ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server
1010if your machine sits behind a firewall.
1111
1212You must create a Spark webhook that points to the URL where this script is
@@ -88,7 +88,7 @@ def sparkwebhook():
8888 elif request .method == 'POST' :
8989 """Respond to inbound webhook JSON HTTP POST from Cisco Spark."""
9090
91- json_data = request .data # Get the POST data sent from Cisco Spark
91+ json_data = request .json # Get the POST data sent from Cisco Spark
9292 print ("\n " )
9393 print ("WEBHOOK POST RECEIVED:" )
9494 print (json_data )
You can’t perform that action at this time.
0 commit comments