On Mon, Sep 1, 2008 at 1:06 PM, jorma kala <[EMAIL PROTECTED]> wrote: > Hi, > > when using httplib for http requests, like for example: > > > conn = httplib.HTTPConnection("www.python.org") > conn.request("GET", "/index.html") > > Is it possible to retrieve the complete http request in string form : > > > GET /index.html HTTP/1.1 > Host: www.python.org > User-Agent: ... > Accept: ... > Accept-Language: > Accept-Encoding: > Accept-Charset: > Keep-Alive: > Connection: > > I mean does the HTTPConnection object have a property that stores this ? > or is it retrievable by some other form? > > Thanks a lot. > --
Looking at the code of HTTPConnection, all that goes through the _output message (including, therefore, the putheaders) are appended to the self._buffer list. Regards Marco -- Marco Bizzarri http://notenotturne.blogspot.com/ http://iliveinpisa.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list