By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,331 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,331 IT Pros & Developers. It's quick & easy.

httplib HTTP: Logging request message

P: n/a
With module httplid, I can do
conn.request("POST", "/target", params, headers)

Now, I want to log the request message that is sent by the request
method. I don't don't see a method for that task. Any suggestion?

For a response, I can log the response message by using the call
method. Though, I have to get rid of the extra strings "replay: " and
"header: ".

data =
print data

/***what the print call will output***/
reply: 'HTTP/1.0 204 \r\n'
header: Content-Length: 0
Jun 28 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I guess the easies way to do it is to copy and modify the httplib
module to log both outgoing and incoming messages.

Jul 2 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.