C
Christopher J. Bottaro
Hi,
I can't for the life of me figure out how to get the post vars when using
basehttpserver. Here's my code:
<code>
class MyHandler(BaseHTTPRequestHandler):
def do_POST(self):
print self.path, self.command
if self.rfile:
print self.rfile.read()
else:
print 'no data'
server = HTTPServer(('', 80), MyHandler)
server.serve_forever()
</code>
When I make a post, it just hangs (in self.rfile.read()).
Thanks for the help.
I can't for the life of me figure out how to get the post vars when using
basehttpserver. Here's my code:
<code>
class MyHandler(BaseHTTPRequestHandler):
def do_POST(self):
print self.path, self.command
if self.rfile:
print self.rfile.read()
else:
print 'no data'
server = HTTPServer(('', 80), MyHandler)
server.serve_forever()
</code>
When I make a post, it just hangs (in self.rfile.read()).
Thanks for the help.