AnyEvent::RPC - Abstract framework for Asyncronous RPC clients
use AnyEvent::RPC; my $rpc = AnyEvent::RPC->new( host => 'your.api.host', port => 8080, base => '/api/rest/', type => 'REST', # or type => '+AnyEvent::RPC::Enc::REST', ) $rpc->req( # will be called as GET http://your.api.host:8080/api/rest/method/path/args?query=param call => [ method => qw(path args)], query => { query => 'param' }, cb => sub { # ( response, code, error ) if (my $response = shift) { # } else { my ($code,$err) = @_; } }, );
Mons Anderson, <mons@cpan.org>
<mons@cpan.org>
Copyright 2009 Mons Anderson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AnyEvent::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::RPC
CPAN shell
perl -MCPAN -e shell install AnyEvent::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.