Skip to content

Instantly share code, notes, and snippets.

Created Jul 13, 2020
What would you like to do?
Very simple Flask webhook receiver
import logging
import pprint
from flask import Flask
from flask import jsonify
from flask import request
from pprint import pformat
app = Flask(__name__)
def serve_json():
response = {
"message": "Hello",
"number": 42
return jsonify(response)
@app.route('/webhook', methods=['GET','POST'])
def webhook():"Request received")
return "OK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment