I'd like to send a JSON rpc to a remote web-server. The client-side of my application must be completely javascript. The choice of the client library should be independant from the json-开发者_运维问答rpc implementation on the server-side. I don't need json-over-http. Simple json objects over tcp/ip is enough for my use-case. Thanks
You could try jsolait. AFAIR it has support for JsonRPC 1.0 over sockets.
Since you are connecting to a remote web server, you will have to use HTTP.
You can use XMLHttpRequest for this from Javascript or you can use a library such as jquery that packages it up in an easier to use API. Many Javascript libraries support this functionality.
I would use Ajax with jQuery. Dead simple.
JQuery Post Documention
精彩评论