Here's how to make a JCON RPC call in jQuery:
$.ajax({url: "bin/controller.py",
type: "POST",
contentType: "application/json",
data: JSON.stringify({"jsonrpc": "2.0",
"method": "echo", "params": ["hello",], "id": 1,
}),
dataType: "json",
success: function(response) {
alert(response.result);
},
});
HTTP- POST, .
JSON. , jQuery.ajax URL- , (.. "Method = echo & params =..." ). , JSON.stringify contentType "application/json", , JSON "application/x-form-urlencoded".
dataType: "json" jQuery (, , JSON), .