I saw in some of the changesets that turbogears supports multiple kinds
of authentication, one of which, should be, http auth. I am trying to
exchange JSON encoded data between a desktop client and the server.
Here is what I tried:

>>> import urllib2
>>> url = "http://localhost:8080";
>>> username = "samuraisam"
>>> password = "bar"
>>> pm = urllib2.HTTPPasswordMgrWithDefaultRealm()
>>> pm.add_password(None, url, username, password)
>>> ah = urllib2.HTTPBasicAuthHandler(pm)
>>> opener = urllib2.build_opener(ah)
>>> urllib2.install_opener(opener)
>>> d = urllib2.urlopen('http://localhost:8080/project')

but it did not work. I kept getting a 403 error. Am I going about this
wrong on the client side? Am I missing something on the server side?
The same code works connecting to my router which uses HTTP
Authentication.

Thanks,
Sam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to