Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (12 sloc) 378 Bytes
from flask import Flask, request, jsonify
from pprint import pprint
app = Flask(__name__)
@app.route('/webhooks/delivery-receipt', methods=['GET', 'POST'])
def delivery_receipt():
if request.is_json:
pprint(request.get_json())
else:
data = dict(request.form) or dict(request.args)
pprint(data)
return ('', 204)
app.run(port=3000)
You can’t perform that action at this time.