Skip to content

Instantly share code, notes, and snippets.

@dcrosta
Created November 27, 2011 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcrosta/1396869 to your computer and use it in GitHub Desktop.
Save dcrosta/1396869 to your computer and use it in GitHub Desktop.
from flask import Flask
app = Flask(__init__)
@app.route('/', methods=['GET'])
def getindex():
return 'You did a GET'
@app.route('/', methods=['POST'])
def postindex():
return 'You did a POST'
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment