Project

General

Profile

upload_file.pl

Anonymous, 2006-10-03 22:24

 
1
#!/usr/bin/perl
2
# Client script "upload_file.pl" (execute locally):
3
require LWP::UserAgent;
4
use HTTP::Request::Common;
5
my $browser = LWP::UserAgent->new();
6
my $url = 'https://localhost:2800/testapp';
7
my $res=$browser->post( $url, [filename => ["testfile.dat"]], 'Content_Type'=>'form-data');
8
print $res->content;
9
exit(0);