test-webhook / app.py
mrfakename's picture
Update app.py
cc420e5 verified
raw
history blame
327 Bytes
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def print_payload():
if request.method == 'POST':
print(request.get_json())
return "Received POST payload"
return "Send a POST request with JSON payload"
if __name__ == '__main__':
app.run(port=7860)