in reply to mechanize questions ?

Looking at the WWW::Mechanize and LWP::UserAgent docs, looks like this (or these methods at least) should get you in the right direction:
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get( $url1 ); $mech->add_header( 'Cookie' => $cookie1 ); $mech->get( $url1 ); $mech->delete_header( 'Cookie' ); $mech->add_header( 'Cookie' => $session ); $mech->default_headers->authorization_basic($browser_username,$browser +_password); $mech->get( $url3 ); ...

Replies are listed 'Best First'.
Re^2: mechanize questions ?
by rootcho (Pilgrim) on Jun 09, 2006 at 17:33 UTC
    that is the problem i may not use the ->get() method 'cause it follows "301 Moved permanently" and i dont want to..'cause it breaks the logic.
    That is why i'm using simple_request(), but then it requres an Request object to be passed as parameter, so i'm creating one and passing it...
    The problem with the default_headers->authorization_basic() is that is that i have a old version of libwww that dont support them (which i forgot to mention ;), sorry)
    Probably within a couple of days i will get permission to upgrade them.
    thanx for the suggestions