使用flask编写一个api
importjsonfromflaskimportFlask,requestapp=Flask(__name__) route("/") .defhello_world(): return"<p>Hello, World!</p>"route("/webhook/event",methods=['POST']) .defevent(): json_data=json.loads(request.data) print(json_data) returnjson_dataif__name__=='__main__': app.run(host="XXXXX",port=8080)