cPanel::APIClient::Transport::HTTPSync - Synchronous HTTP transport
my $remote_cp = cPanel::APIClient->create( service => 'cpanel', transport => [ 'HTTPSync', hostname => 'somewhere.out.there', # Not for production: # tls_verification => 'off', ], credentials => { username => 'johnny', password => '$3kr1t', }, ); my $resp = $remote_cp->call_uapi( 'Email', 'list_forwarders' );
This transport mechanism implements access to cPanel & WHM’s APIs via synchronous (i.e., blocking) HTTP.
cPanel::APIClient::Transport::NetCurlPromiser and cPanel::APIClient::Transport::Mojolicious facilitate sending multiple concurrent API requests.
Copyright 2020 cPanel, L. L. C. All rights reserved. http://cpanel.net
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install cPanel::APIClient, copy and paste the appropriate command in to your terminal.
cpanm
cpanm cPanel::APIClient
CPAN shell
perl -MCPAN -e shell install cPanel::APIClient
For more information on module installation, please visit the detailed CPAN module installation guide.