HTTP::Request is your friend. It generates an HTTP request, whether it be
a get or a post.
LWP::UserAgent actually performs the request for you.
## example:
my $request = HTTP::Request->new(POST=>'http://foo.bar.com');
$request->content_type('application/x-www-form-urlencoded');
$request->content("XMLStuff=$scalarWithYourXML"); ## add the xml to the post.
my $ua = LWP::UserAgent->new;
my $response;
$response = $ua->simple_request($request);
unless ( $response->is_success ) {
## do what must be done in event of a failure
}
## whatever else....
The receiving server could grab the XMLStuff as $r->param('XMLStuff');
Hope i answered your question!
- Matt Avitable
On Tue, 17 Oct 2000, Geoffrey Gallaway wrote:
>
> I'm trying to find a way to do XML over HTTP. I have a project at work
> that I'm doing where we have a XML based system. The system would connect
> to port 80 and do XML over HTTP. I'm not exactly sure what this entails
> but I'm guessing using the HTTP protocall to send XML. So, you get the
> HTTP methods (GET, POST, HEAD, etc) and headers (Date, Server,
> Content-Type, etc) but with XML data instead of HTML. Now, I understand I
> could easily use apache to send XML data (GET) but I'm not to sure how I
> should handle receiving XML (POST). I definetly want to do the XML parsing
> and such with perl (I've been playing with XML::Parser, very cool). What
> am I missing?
>