Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created February 27, 2013 06:14
Show Gist options
  • Save chmouel/5045615 to your computer and use it in GitHub Desktop.
Save chmouel/5045615 to your computer and use it in GitHub Desktop.
# test_server.py
import webob
from paste import httpserver
def app(environ, start_response):
request = webob.Request(environ)
print request
start_response("200 OK", [("Content-Type", "text/plain")])
for name,value in request.POST.items():
yield "%s: %s\n" % (name, value)
httpserver.serve(app, port=5000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment