Skip to content

Instantly share code, notes, and snippets.

@liuliqiang
Last active September 9, 2016 03:34
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 liuliqiang/51a44883197813af77870c0d7c2c3898 to your computer and use it in GitHub Desktop.
Save liuliqiang/51a44883197813af77870c0d7c2c3898 to your computer and use it in GitHub Desktop.
flask-issue-2016-test
#!/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)
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