Created
May 27, 2010 03:38
-
-
Save hboon/415420 to your computer and use it in GitHub Desktop.
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
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