Alternatives to cURL/wget for Remote API Calls

aixcurlwget

I'm on IBM AIX 7.1 where cURL and wget are not available. Also, I'm not in a position to install either.

Are there alternatives that would be available that would enable remote API calls using GET/POST?

Best Answer

Since perl is installed by default in AIX, you could use the HTTP and LWP modules; an example, from https://metacpan.org/pod/distribution/libwww-perl/lwpcook.pod#POST, is:

use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new;

my $req = POST 'https://rt.cpan.org/Public/Dist/Display.html',
              [ Status => 'Active', Name => 'libwww-perl' ];

print $ua->request($req)->as_string;
Related Question