Created
May 27, 2014 18:50
-
-
Save jz5/25a23cd56d7c8cca139a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#coding:utf-8 | |
import cgi | |
def application(environ, start_response): | |
fs = cgi.FieldStorage(environ=environ, fp=environ['wsgi.input']) | |
value = fs.getfirst('val', 'Python') | |
status = '200 OK' | |
response_headers = [('Content-type', 'text/plain')] | |
start_response(status, response_headers) | |
yield 'こんにちは {0}\n'.format(value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment