A
at
Thanks for the several responses I have received all of which I have
tried. However, the program seems to fail during executing always at
the same spot. I receive NO error messages, but I receive NO response
other than the html page being sent to me again. I would assume this
indicates an error so retry.
Here is my code snippet. How would one go about altering this to
make it work?
======================================================
my $URL2="https://www.blah.com";
my $DATA="";
my $fname="filename";
open(TFH,"<$filename.in") or die "Cannot Open $filename.in\n";
while(<TFH>) {
$DATA.=chomp($_);
}
close(TFH);
$REQ= POST $URL2,
[ NETCONNECT_TRANSACTION => $DATA ];
$RSP=$UA->request($REQ, "$filename.out");
=====================================================
The above request should be a rather normal POST request and the
content should be the descriptor "NETCONNECT_TRANSACTION=" and the
field $DATA is the entire contents of an XML formatted file. There is
also a cookie automatically attached to the request that was
previously retrieved after authenticating with the remote host.
The request line should write the response received from the remote
host into the file $filename.out.
Any guidance, advise, code revisions, etc. will be G-R-E-A-T-L-Y
appreciated.
Bob
tried. However, the program seems to fail during executing always at
the same spot. I receive NO error messages, but I receive NO response
other than the html page being sent to me again. I would assume this
indicates an error so retry.
Here is my code snippet. How would one go about altering this to
make it work?
======================================================
my $URL2="https://www.blah.com";
my $DATA="";
my $fname="filename";
open(TFH,"<$filename.in") or die "Cannot Open $filename.in\n";
while(<TFH>) {
$DATA.=chomp($_);
}
close(TFH);
$REQ= POST $URL2,
[ NETCONNECT_TRANSACTION => $DATA ];
$RSP=$UA->request($REQ, "$filename.out");
=====================================================
The above request should be a rather normal POST request and the
content should be the descriptor "NETCONNECT_TRANSACTION=" and the
field $DATA is the entire contents of an XML formatted file. There is
also a cookie automatically attached to the request that was
previously retrieved after authenticating with the remote host.
The request line should write the response received from the remote
host into the file $filename.out.
Any guidance, advise, code revisions, etc. will be G-R-E-A-T-L-Y
appreciated.
Bob