Skip to content

Instantly share code, notes, and snippets.

@bhanuvrat
Last active January 1, 2016 06:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhanuvrat/8104480 to your computer and use it in GitHub Desktop.
Save bhanuvrat/8104480 to your computer and use it in GitHub Desktop.
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