in reply to Re^10: Cant get www:Mechanize to work
in thread Cant get www:Mechanize to work

As the documentation says, WWW::Mechanize is a subclass of LWP::UserAgent, so the approaches outlined in LWP::Debug all hold for WWW::Mechanize as well.

Replies are listed 'Best First'.
Re^12: Cant get www:Mechanize to work
by yantar (Initiate) on Jun 09, 2009 at 14:30 UTC
    But that i what i wrote i used....
    use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->default_header('Accept-Encoding' => scalar HTTP::Message::decod +able()); $ua->add_handler("request_send", sub { shift->dump; return }); $ua->add_handler("response_done", sub { shift->dump; return }); $ua->get($mech->uri);
    And apparently it doest show the correct info????
      Earth to yantar, stop doing that! :)
        Ok using WireShark.
        I see the user-agent is correct.
        I see there are 2 cookies passed when i ran my code:
        Cookie: ASP.NET_SessionId=vkx1wmazp0y12g45natdsuqi\r\n
        Cookie2: $Version="1"\r\n

        and this is what i c in the browser:
        Cookie: ASP.NET_SessionId=dbc0hb45pxfvdrnwls1mtfae\r\n

        Now what is wrong?