My system does not have wget, curl and lynx. The chances are low that the SA would install them for me. Do I have any other way out? I need to invoke a few URL calls from my SHELL script.
Thought of using a PERL script or writing a simple Java client, but that adds in more dependencies.
But for plain vanilla HTTP, if you can't really install LWP (note that you can download and install the module together with the script and not install it systemwide), a simple sequence of commands will do it:
use IO::Socket::INET;
$http = IO::Socket::INET->new(
PeerAddr => "www.unix.com:80",
Proto => "tcp"
);
$http->print("GET /showthread.php?t=37182 HTTP/1.0\nHost: www.unix.com\n\n");
print $http->getlines();
which will display the HTML for this page. IO::Socket::INET is shipped standard with Perl, so you cannot say it is an "external dependency".
Your system does not have IO::Socket::INET installed. It is weird, because it is a standard module. So your system probably has an imcomplete, or very trimmed down installation of perl.
There was probably a restructuring of the modules since then ... I actually found IO::Socket::INET in the 5.5 documentation somewhere, but there are apparently no IO/Socket/INET.pm, so it seems the module exists, but require "use IO::Socket" instead of "use IO::Socket::INET". I no longer have this exact version to test the claim though.
You can install them in your home directory. Either download a binary (perhaps extract them from deb or rpm packages), or get the source code and compile them.
Hi, I have to make call to servlet from either unix or perl,
my serlvet is returning me .zip file as part of the response.
can any body tell me how to capture the response and store it as a .zip file at the client machine.