Skip to content

Instantly share code, notes, and snippets.

@exhuma
Created November 11, 2013 10:50
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 exhuma/7411368 to your computer and use it in GitHub Desktop.
Save exhuma/7411368 to your computer and use it in GitHub Desktop.
URL decoding in Flask
clear && curl http://localhost:5000/foo+bar
curl http://localhost:5000/foo%20bar
from flask import Flask
app = Flask(__name__)
@app.route('/<name>')
def hello_world(name):
return 'Hello World: {!r}!'.format(name)
if __name__ == '__main__':
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment