Ticket #881: upload_file.pl
| File upload_file.pl, 321 bytes (added by anonymous, 2 years ago) |
|---|
| Line | |
|---|---|
| 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); |

