Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
simple flask script to print whatever is posted to it.
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
data = request.data or request.form
print '*'*40
print data
print '*'*40
return 'OK'
if __name__=='__main__':
app.run(host='0.0.0.0', port=5000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.