Skip to content

Instantly share code, notes, and snippets.

@hboon
Created May 27, 2010 03:38
Show Gist options
  • Save hboon/415420 to your computer and use it in GitHub Desktop.
Save hboon/415420 to your computer and use it in GitHub Desktop.
import socket
from twisted.internet import reactor
from twisted.web import server, resource
class S(resource.Resource):
isLeaf = True
def render_POST(self, request):
print request.args
print dir(request)
print request.getAllHeaders()
root = resource.Resource()
root.putChild("x", S())
site = server.Site(root)
reactor.listenTCP(5000, site)
reactor.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment