Class zebkit.io.JRPC
extends <zebkit.io.Service>
<zebkit.io>

The class is implementation of JSON-RPC remote service connector.

   // create JSON-RPC connector to a remote service that
   // has three remote methods
   var service = new zebkit.io.JRPC("json-rpc.com", [
       "method1", "method2", "method3"
   ]);

   // synchronously call remote method "method1"
   service.method1();

   // asynchronously call remote method "method1"
   service.method1(function(res) {
       ...
   });
Constructor:
zebkit.io.JRPC (url, methods)

Parameters:
  • url <String>

    an URL of remote service

  • methods <Array>

    a list of methods names the remote service provides





public static void invoke (url, method)

Shortcut to call the specified method of a JSON-RPC service.


Parameters:


Inherited attributes:
public Array methods    public String url