Jason Xu
Jason Xu

Reputation: 2963

Go JSON RPC v2 over HTTP

In the Go world is there any project implements the JSON RPC 2.0 (HTTP), especially the feature of batched query?

Some background that is, I know there's a Go built-in one but it's not over HTTP, and Gorilla looks to supports V2 (in the v2 folder, however I can't find documentation with it), but as I tested it response empty result for a combined request like "[{valid_request...},{valid_request...}]". Maybe it hasn't implemented the batched one. (Have I missed anything to get it right?)

Upvotes: 1

Views: 2380

Answers (1)

Jason Xu
Jason Xu

Reputation: 2963

Since I can't find a ready Go server support for JsonRpc 2.0 for now, I modified the gorilla JsonRPC 2.0 to support the batched query. The forked repo is at https://github.com/jason-xxl/rpc . Just need to change the import path from "gorilla/rpc/v2" to "jason-xxl/rpc/v2_batch" to get a testable batched query enabled server. (Please let me know if I missed any one that already support 2.0 batch.)

Upvotes: 1

Related Questions