Add some reqs, implement simple webhook that returns webhook request in JSON

master
Emiel Kollof 2018-01-11 15:11:51 +01:00
parent ac627903dd
commit e4a8c6ee60
4 changed files with 10 additions and 2 deletions

0
README.md Normal file → Executable file
View File

12
app.py
View File

@ -1,10 +1,10 @@
#!/usr/bin/env python
import os
import sys
import requests
from flask import Flask
from flask import render_template
from flask import Flask, request, render_template, abort
application = Flask(__name__)
@ -12,5 +12,13 @@ application = Flask(__name__)
def hello():
return "I'm alive."
@application.route("/webhook")
def webhook():
if request.method == 'POST':
print(request.json)
return '', 200
else:
abort(400)
if __name__ == '__main__':
application.run(host="0.0.0.0",port=8080)

0
requirements.txt Normal file → Executable file
View File

0
template.xml Normal file → Executable file
View File