in reply to Re: HTTP Post of XML data
in thread HTTP Post of XML data
And I added this at the end of my current script, and got this error:#!/usr/bin/perl use XML::Writer; use LWP::UserAgent; my $output; my $writer = new XML::Writer(OUTPUT => \$output); $writer->startTag("greeting", "class" => "simple"); $writer->characters("Hello, world!"); $writer->endTag("greeting"); $writer->end(); print $output; my $browser = LWP::UserAgent->new; my $url = 'http://localhost:8180/request'; my $response = $browser->post($url,Content => $output);
Not an ARRAY reference at /usr/share/perl5/HTTP/Request/Common.pm line + 83.
I tried with Content => \$writer, CONTENT => $writer, and just $writer. I'll keep fiddling with this unless someone else has suggestions on a better way to post this $writer to a specific port/urlmy $browser = LWP::UserAgent->new; my $url = 'http://localhost:8180/request'; my $response = $browser->post($url,$writer);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HTTP Post of XML data
by rvosa (Curate) on Nov 14, 2007 at 05:42 UTC | |
by erroneousBollock (Curate) on Nov 14, 2007 at 05:57 UTC | |
by hallikpapa (Scribe) on Nov 14, 2007 at 06:25 UTC | |
by erroneousBollock (Curate) on Nov 14, 2007 at 06:33 UTC | |
by hallikpapa (Scribe) on Nov 14, 2007 at 06:40 UTC |