post xml within speedscript

bino

Member
Hello,

I am trying to come up wit a solution to post and XML file to a server for a request.

The server accepts XML requests and then returns results as XML.

I would setup a form within webspeed HTML/speedscript, but Im not sure if I can do a post.

I was trying to do a command request to a perl script to do the post like below:

use strict;

use LWP::UserAgent;

#-- create the request
my $request = new HTTP::Request( 'POST',
'http://www.theserverurl.com' );
$request->header( 'Content-Type' => 'application/x-www-form-urlencoded' );
$request->content( 'xmlcontent or file' );

#-- create the agent
my $agent = new LWP::UserAgent;
$agent->agent( "$0/0.1 " . $agent->agent );

#-- send the request and get the response
my $response = $agent->request( $request, "test.txt");
if ($response->is_success) {
print "ok\n";
}
else {
print $response->status_line, "\n";
}

It works, but the connection request must be a secured http request "https", and it seems perl in this method does not support secure https requests. If you know how to implement this procedure using https with perl or Any of you master webspeed peggers utilize webspeed to post an xml file to a server to return a response XML file your input would be appreciated.

examples would be helpful =)

Thanks.
 
well to reply to my own message, CURL, free exe works great for doing a post via http whether http or https. Very simple to implement from the command line.
 
Back
Top