in reply to http upload simulating browser

You could also do it this way:
use strict; require LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new('GET', 'http://server.com/cgi-bin/upload. +cgi'); my $resp = $ua->request($req, 'c:/test.dat'); if ($resp->is_success) { print "Success.\n"; } else { print "Failed.\n"; }
--Jim

Update: Sorry about that. I misread the original post and was thinking download.

Replies are listed 'Best First'.
Re: Re: http upload simulating browser
by IlyaM (Parson) on Dec 07, 2001 at 01:54 UTC
    You cannot upload files with GET request. And second optional parameter of $us->request is not a file to upload but is a file to save response.

    --
    Ilya Martynov (http://martynov.org/)