Again. Who mentioned CGI. It isn't necessary in CGI. I know how LWP works to post something. I know that. I just told earlier I want to receive the XML stream posted to my https server. Can it be done just to receive the stream. I don't want that file upload thing 'cos that isn't what I need.
Let me give a rough example.
Watch out! insecure script: no use strict and -wT. Only used do demonstrate my intentions...
The sending script:
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("PlanetXML/0.1 " . $ua->agent);
my $req = new HTTP::Request POST => 'http://www.test.be/cgi-bin/xmlrec
+eive.cgi';
$req->content_type('text/xml');
$content=<<END;
<request>
<header>
<from>Sender</from>
<to>Receiver</to>
</header>
<body>
lots of stuff
</body>
</request>
END
$req->content($content);
my $res = $ua->request($req);
if ($res->is_success) {
print $res->content;
} else {
print "Error\n";
}
For the receiver: Maybe it's not ok what I do but it works :)
use CGI;
$q = new CGI;
print $q->header;
@name = $q->param('keywords');
print map("$_\n",@name);
Hope this will show better what I mean!
--
My opinions may have changed,
but not the fact that I am right
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.