in reply to Help, AnyEvent::HTTP no work!

Compare:

my $ua=LWP::UserAgent->new(agent=>'Mozilla/5.0 (Windows NT 10.0; rv:46.0) Gecko/20100101 Firefox/46.0',timeout=>10);
with
'User-Agent'=>'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0',
and explain why you have created such different headers?


"It doesn't work" is as useful to a developer as "I'm ill" is to a medic. Be specific.

Replies are listed 'Best First'.
Re^2: Help, AnyEvent::HTTP no work!
by Perl_Love (Acolyte) on May 09, 2016 at 12:17 UTC
    Hello , afoken , Corion , hippo : AnyEvent::HTTP cannot work ,the reason is that http_post login HTML information only,but could not simulate the login website same as LWP example . I know the pass parameters method of LWP POST ,such as UserName ,PassWord , LoginButton . But I do not know AnyEvent::HTTP is how to transfer the information to the website. I created headers from HttpFox . Could you help to make a simple AnyEvent::HTTP transfer example for reference ? Even though I am a novice,I like Perl very much ! Thanks a lot ~