authentication - python http request with token -


How and with whom is the Python library possible to create a httprequest (https) with a user: password or token?

Originally the curl -u user: pwd https://www.mysite.com/

thanks

class urllib2.HTTPSHandler is to handle opening a square HTTPS URL.

21.6.7. HTTPPasswordMgr objects These methods are available on HTTPPasswordMgr and HTTPPasswordMgrWithDefaultRealm objects.

HTTPPasswordMgr.add_password (realm, URI, user, passwd) Yuri can be either a URI or a sequence of URIs. Realm, user and passwd wire should be used for this reason (user, passwd) to be used as an authentication token when authentication for realm and any of the given URIs is given a super-URI. HTTPPasswordMgr.find_user_password (realm, authuri) Get user / password for given realm and URI, if any

For the HTTPPasswordMgrWithDefaultRealm object, no one will be found if a user / password in the given realm is not.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -