Subject: | Alternate way of using authentication |
In Mechanize 1.12, the FAQ for "How_do_I_get_Mech_to_handle_authentication?" recommends, in addition to the credentials() method, passing extra arguments to the get() method. This works for get() requests, but it does not then use those credentials for futher submit_form() calls.
The FAQ might want to also mention that if one wishes to use the credentials for all future requests (I think), they should use the LWP::UserAgent default_header() method instead of the extra arguments to get():
$mech->default_header( Authorization => 'Basic '
. encode_base64( USER . ':' . PASSWORD ) );
Much love.