transifex-webhook/flask_webhook/webhook_app/server.py

16 lines
283 B
Python

from flask import Flask, request, abort
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
if request.method == 'POST':
print(request.json)
return 'success', 200
else:
abort(400)
if __name__ == '__main__':
app.run()