Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suppport for logging HTTP requests #7

Open
olberger opened this issue Mar 14, 2014 · 1 comment
Open

Add suppport for logging HTTP requests #7

olberger opened this issue Mar 14, 2014 · 1 comment

Comments

@olberger
Copy link

When things go wrong, it helps to be able to debug the HTTP requests taking place.

I think it would be great to have a mean to set a debug flag so as to get a log.

For the moment, I've patched the code to get
self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(wiki.cookies), urllib2.HTTPSHandler(debuglevel=1))
in api.py

Hope this helps.

@cariaso
Copy link

cariaso commented Apr 20, 2014

To save someone else the time, this change worked for me with the current version of the code

           if wiki.passman is not None:
                    self.opener = urllib2.build_opener(urllib2.HTTPDigestAuthHandler(wiki.passman), urllib2.HTTPCookieProcessor(wiki.cookies))
            else:
                    self.opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1),urllib2.HTTPCookieProcessor(wiki.cookies))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants