Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 8084415 Oct 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE init Oct 5, 2019 add godoc link Oct 5, 2019
go.mod init Oct 5, 2019
http.go init Oct 5, 2019
http_test.go add unit tests Oct 5, 2019



Example Usage

package main

import (


type Args struct {
    A, B int

type Arith int

func (t *Arith) Multiply(args *Args, reply *int) error {
    *reply = args.A * args.B
    return nil

func main() {
    arith := new(Arith)
    http.Handle("/", jsonrpc.Handler(rpc.DefaultServer))
    log.Fatal(http.ListenAndServe(":8080", nil))

Build and start the server, then invoke the Arith.Multiply method with curl:

curl \
  -d '{"method":"Arith.Multiply","params":[{"A": 10, "B":2}], "id": 0}'
You can’t perform that action at this time.