basehttprequesthandler

Writing response body with BaseHTTPRequestHandler

Writing response body with BaseHTTPRequestHandler Question: I’m playing a little with Python 3.2.2 and want to write a simple web server to access some data remotely. This data will be generated by Python so I don’t want to use the SimpleHTTPRequestHandler as it’s a file server, but a handler of my own. I copied some …

Total answers: 4

How to extract HTTP message body in BaseHTTPRequestHandler.do_POST()?

How to extract HTTP message body in BaseHTTPRequestHandler.do_POST()? Question: In the do_POST() method of BaseHTTPRequestHandler I can access the headers of the POST request simply via the property self.headers. But I can’t find a similar property for accessing the body of the message. How do I then go about doing that? Asked By: Frederick The …

Total answers: 1