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?

  • 1
    lynx, w3m... At worst case scenario you can use netcat and write GET/POST by hand. (Btw. i don't understand why you can't compile a binary as user.) – Ipor Sircer Nov 28 '18 at 14:03
  • 2
    perl -- use LWP – Jeff Schaller Nov 28 '18 at 14:15
  • 1
    Of course! Perl... and I just thought of Python. I knew there was options, just never associated these for this type of task. – TekiusFanatikus Nov 28 '18 at 14:18
  • 1
    Uhh.. Wget will compile on AIX, without problems. And I'm pretty sure curl will to. What is the problem? – darnir Nov 28 '18 at 18:43
  • 1
    @TekiusFanatikus: Look at this SE thread. Seems to have a similar problem as you. unix.stackexchange.com/questions/362981/… – darnir Nov 28 '18 at 21:25

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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.