hexatridecimal / rpcjson Goto Github PK
View Code? Open in Web Editor NEWA modern Ruby implementation of the JSON-RPC standards 1.1 and 2.0.
License: MIT License
A modern Ruby implementation of the JSON-RPC standards 1.1 and 2.0.
License: MIT License
@jjeffus Maybe an update on the code is required? There are some pull requests still pending.
RPC::JSON::Client is using GET requests, though in the specification it says to use POST.
I like the convenient of the rpcjson gem over setting everything up manually with something like net/http, but I need the performance benefits of HTTP keep-alive, HTTP pipelining, and JSON-RPC 2.0 batches. Are any of these supported, or planned for the future?
(It looks like a dead project, but there aren't any competitors, so thought I'd try my luck.)
If I do:
s = RPC::JSON::Client.new 'http://example.com/api', 2.0
s.myethod( source: 'apple', anum: 1 )
The JSON body I receive at the server looks like this:
{"jsonrpc":"2.0","method":"myethod","id":1,"params":[{"source":"apple","anum":1}]}
However, as I understand the 2.0 spec at http://www.jsonrpc.org/specification
the positional parameters shouldn't be in an array. Hence it should send:
{"jsonrpc":"2.0","method":"myethod","id":1,"params":{"source":"apple","anum":1}}
Otherwise, thanks for a nice simple & tight little gem.
Cheers.
The http socket is kept open in the client library leading to this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.