HTTP::Request::FormHTTP::Request::Form is a Perl module that will construct HTTP::Request objects for form processing. | |
Download |
HTTP::Request::Form Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Georg Bauer
- Publisher web site:
- http://search.cpan.org/~gbauer/HTTP-Request-Form-0.952/Form.pm
HTTP::Request::Form Tags
HTTP::Request::Form Description
HTTP::Request::Form is a Perl module that will construct HTTP::Request objects for form processing. HTTP::Request::Form is a Perl module that will construct HTTP::Request objects for form processing.SYNOPSISuse the following as a tool to query Altavista for "perl" from the commandline: use URI::URL; use LWP::UserAgent; use HTTP::Request; use HTTP::Request::Common; use HTTP::Request::Form; use HTML::TreeBuilder 3.0; my $ua = LWP::UserAgent->new; my $url = url 'http://www.altavista.digital.com/'; my $res = $ua->request(GET $url); my $tree = HTML::TreeBuilder->new; $tree->parse($res->content); $tree->eof(); my @forms = $tree->find_by_tag_name('FORM'); die "What, no forms in $url?" unless @forms; my $f = HTTP::Request::Form->new($forms, $url); $f->field("q", "perl"); my $response = $ua->request($f->press("search")); print $response->content if $response->is_success;This is an extension of the HTTP::Request suite. It allows easy processing of forms in a user agent by filling out fields, querying fields, selections and buttons and pressing buttons. It uses HTML::TreeBuilder generated parse trees of documents (especially the forms parts extracted with extract_links) and generates it's own internal representation of forms from which it then generates the request objects to process the form application. Requirements: · Perl
HTTP::Request::Form Related Software