tracing openurl input and output?

mh at pixar.com mh at pixar.com
Sun Aug 9 05:37:52 EDT 2009


How can I watch the messages being sent back and for on urllib shttp
requests?  If it were simple http I would just watch the socket traffic
but of course that won't work for https.  Is there a debug flag I can
set that will do this?

context:  I am dealing with a web service bug and I want to tell
the provider exactly what is going back and forth to his server,
eliminating the "maybe there's a bug in your library" chat.

    import urllib
    params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
    f = urllib.urlopen("https://example.com/cgi-bin/query", params)

Many TIA!

-- 
Mark Harrison
Pixar Animation Studios



More information about the Python-list mailing list