Last active
January 1, 2016 06:19
-
-
Save bhanuvrat/8104480 to your computer and use it in GitHub Desktop.
simple flask script to print whatever is posted to it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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