Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Re-submit HTML form including inputs

by hgolden (Pilgrim)
on Sep 13, 2006 at 20:30 UTC ( [id://572809]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Re-submit HTML form including inputs
in thread Re-submit HTML form including inputs

So I think the issue is that when you resubmit the form, you're using post which will try and generate a HTTP::Request object. The problem is that you already have such an object.

Here's an example from http://www.icewalkers.com/Perl/5.8.0/lib/HTML/Form.html:

use HTML::Form; $form = HTML::Form->parse($html, $base_uri); $form->value(query => "Perl"); use LWP; LWP::UserAgent->new->request($form->click);
Both click and make_request return request objects, and you can see that they're using LWP's request to send them.

I was trying to point you to this in my first post, though I admit that it was pretty unclear. Check out http://kobesearch.cpan.org/htdocs/libwww-perl/LWP/UserAgent.html#ua_gt_request_request.

See how $ua->request sends a request object? Try that on your $req which is such a request object, and let me know if that doesn't work.

Hays

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2025-05-24 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.