You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2022. It is now read-only.
Hi,
Using a server like:
from jsonrpc import handleCGI, ServiceMethod
class BasicService:
@ServiceMethod
def echo(self,msg):
return msg
@ServiceMethod
def add (self,a,b):
return a + b
if name == 'main':
service = BasicService()
handleCGI(service)
And a js client like
var jsonService = new JsonRpc.ServiceProxy("http://localhost/jsonrpcserver.py", {
asynchronous: true,
methods: ['echo']
});
JsonRpc.setAsynchronous(jsonService, true);
try {
jsonService.echo(
{
params: ['boo'],
onSuccess: function(result) {
console.log("result is " + result);
},
onException: function(e) {
console.log("Unable to compute because: " + e);
return true;
}
});
} catch (Exception) {
log.error("erorr running ecbo");
}
line 262: if (response.error !== undefined && response.error !== null)
response.error !== null needs to be added?
The text was updated successfully, but these errors were encountered: