If the -d @test.xml command is supposed to read the file test.xml into memory and send it as the body of the POST request, I guess you'll have to do the part of reading the file in Perl.
my $filename = 'test.xml'; open my $fh, '<', $filename or die "Couldn't read '$filename': $!"; binmode $fh, ':raw'; my $content = do { local $/; <$fh> }; # sluuurp $hash_form = { ... data => $content ... }
In reply to Re: curl http post using LWP::Curl
by Corion
in thread curl http post using LWP::Curl
by wanderedinn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |