14
11

More than 5 years have passed since last update.

flask/python で POST されたデータを echo するサーバー

Last updated at Posted at 2014-12-18

webhook とかのデバッグに利用

python
from flask import Flask, request
app = Flask(__name__)

@app.route("/", methods=['POST'])
def webhook():
    print request.headers
    print "body: %s" % request.get_data()
    return request.get_data()

if __name__ == "__main__":
    app.run()
14
11
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
11