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 2
2
# -*- coding: utf-8 -*-
3
3
"""A simple bot script, built on Flask.
4
4
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(...)`).
8
8
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
10
10
if your machine sits behind a firewall.
11
11
12
12
You must create a Spark webhook that points to the URL where this script is
@@ -88,7 +88,7 @@ def sparkwebhook():
88
88
elif request .method == 'POST' :
89
89
"""Respond to inbound webhook JSON HTTP POST from Cisco Spark."""
90
90
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
92
92
print ("\n " )
93
93
print ("WEBHOOK POST RECEIVED:" )
94
94
print (json_data )
You can’t perform that action at this time.
0 commit comments