Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: WWW::Mechanize Post Method - Help find error

by Agyeya (Hermit)
on May 18, 2004 at 06:14 UTC ( [id://354185]=note: print w/replies, xml ) Need Help??


in reply to Re: WWW::Mechanize Post Method - Help find error
in thread WWW::Mechanize Post Method - Help find error

Thank you for your help, i located the error.
The code
$request = new HTTP::Request(POST "http://www.abc.com/ChooseZone.aspx? +type=A" , [ '__EVENTTARGET' => "rdlZone_0", '__EVENTARGUMENT' => "", '__VIEWSTATE' => "dDw0NzUyO", 'rdlZone' => "1", ] );
has been changed to
$request = new HTTP::Request('POST'=> "http://www.abc.com/ChooseZone.a +spx? +type=A" , [ '__EVENTTARGET' => "rdlZone_0", '__EVENTARGUMENT' => "", '__VIEWSTATE' => "dDw0NzUyO", 'rdlZone' => "1", ] );
It was a matter of changing POST to 'POST'=>
Thank you for your help

Replies are listed 'Best First'.
Re: Re: Re: WWW::Mechanize Post Method - Help find error
by revdiablo (Prior) on May 18, 2004 at 16:31 UTC
    It was a matter of changing POST to 'POST'=>

    For future reference, note that the => operator is just like the comma, except it does automagic quoting of its left-hand-side. This is made exactly for the case you've shown, to eliminate the need for quoting. In other words, your line could be written as:

    $request = new HTTP::Request(POST => "...", [ __EVENTTARGET => "rdlZone_0", __EVENTARGUMENT => "", __VIEWSTATE => "dDw0NzUyO", rdlZone => "1", ] );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://354185]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-03-29 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found