Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Using Mechanize With Odd Query String

by repellent (Priest)
on Mar 03, 2012 at 21:12 UTC ( #957713=note: print w/replies, xml ) Need Help??


in reply to Using Mechanize With Odd Query String

Your form key/value pairs need to be specified as Content:
$browser->post("$BASEURL?use-a", { 'target' => '195' } ); # now a hash +ref

The documentation for ->post mentions $field_name which may be confused as being a form key name. The $field_name => $value pairs actually get pushed onto the Header instead of the Content.

Replies are listed 'Best First'.
Re^2: Using Mechanize With Odd Query String
by Anonymous Monk on Mar 06, 2012 at 22:12 UTC
    Thank you. I did not understand the documentation even when I re-read it. Thank you for explaining it succinctly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://957713]
help
Chatterbox?
[marto]: which part don't you know how to do?
[marto]: oh
[Corion]: arunks: Maybe How do I make password prompts not echo back the user?? Or simply read it from STDIN.
[Corion]: arunks: Please do not ask us to write your program. You have to write your program yourself.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2017-01-20 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.