in reply to Re^3: WWW::Mechanize and basic authentication
in thread WWW::Mechanize and basic authentication

Perhaps I should make the new HTTP::Request that gets created by follow() somehow inherit the credentials from the initial request?

Or is this not a problem?

xoxo,
Andy
--
<megaphone> Throw down the gun and tiara and come out of the float! </megaphone>

  • Comment on Re: Re^3: WWW::Mechanize and basic authentication

Replies are listed 'Best First'.
Re: Re: Re^3: WWW::Mechanize and basic authentication
by iguanodon (Priest) on Jan 29, 2003 at 20:15 UTC
    I don't think it it's a problem. Calling $agent->credentials() makes more sense than getting an HTTP::Request object and calling authorization_basic() on it, now that I understand how it works. An example in the docs would be good, though.

      As always, patches welcome!

      If you have sample code and an explanation, I'll add it to the docs for the distro. Either email me at andy@petdance.com or submit it at http://rt.cpan.org.

      Thanks,
      xoxo,
      Andy

Re^5: WWW::Mechanize and basic authentication
by adrianh (Chancellor) on Jan 29, 2003 at 19:48 UTC
    Perhaps I should make the new HTTP::Request that gets created by follow() somehow inherit the credentials from the initial request?

    Maybe have the option to specify the request object in the follow/get so you could do:

    $agent->follow($link, request => $agent->req)

    Then again, it's never been a problem for me. Maybe make the semantics of req a little more explicit in the docs?