pchan has asked for the wisdom of the Perl Monks concerning the following question:
How do I retrieve a text file using a form submission?
I'm currently experimenting with asp scripts and trying to automate multiple requests.
I've tried using code from some of the other posts but didn't achieve my desired result.
Basically, I have an HTML form input box where the user types in the file name. Upon clicking the submit button the user is asked if they want to save the file.
Most of the perl code I've tried have given me "HTTP/1.1 100 Continue".
The following code I've used:
Thanks in advance.use strict; use warnings; use LWP::UserAgent; my $ua = new LWP::UserAgent(); my $url = "http://someurl"; my $request = new HTTP::Request( 'POST', $url ); $request->content_type( 'application/x-www-form-urlencoded' ); $request->content( 'name=value'); my $response = $ua->request( $request );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: retrieve text file using form submission
by tilly (Archbishop) on Oct 21, 2001 at 09:01 UTC |