Last active
September 9, 2016 03:34
-
-
Save liuliqiang/51a44883197813af77870c0d7c2c3898 to your computer and use it in GitHub Desktop.
flask-issue-2016-test
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import os.path as op | |
from flask import Flask, request, render_template | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
print request.args | |
for k, v in request.args.iteritems(): | |
print "{}={}".format(k, v) | |
return "yes" | |
if __name__ == '__main__': | |
app.run(debug=True, port=9090) |
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
curl -X GET "http://127.0.0.1:9090?type=i'am中国人" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment