need a url that its http response header that cotain 401 status code
Hans Mulder
hansmu at xs4all.nl
Wed Dec 26 06:40:25 EST 2012
On 26/12/12 10:08:41, iMath wrote:
> I am going to do a Basic Authentication ,
> so I need a url
> that its http response header that cotain 401 status code.
Isn't that backwards? I mean, what's the point of implementing
Basic Authentication, unless you already know a site that uses it?
if you don't know any such site, you can set one up easily:
just run a webserver on your laptop and password-protect a page
in your server configuration.
When you've found a suitable url, take a look at HTTPBasicAuthHandler
in the urllib2 modules.
Hope this helps,
-- HansM
More information about the Python-list
mailing list