perlnewb123 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; use URI::Escape qw( uri_escape ); my $uid = "user"; my $upw = "pass"; my $ua = LWP::UserAgent->new(agent => 'perl put'); $ua->credentials('host.com:80', '', $uid, $upw); my $message = "</path/file.xml"; my $response = $userAgent->request(PUT 'http://host.com/xml', Content_Type => 'text/xml', Content => $message); print $response->error_as_HTML unless $response->is_success; print $response->content();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with HTTP POST xml file
by ccn (Vicar) on Nov 19, 2008 at 16:55 UTC | |
by perlnewb123 (Sexton) on Nov 19, 2008 at 18:42 UTC |