I haven't been able to find any documentation on this. I need to make JSON-RPC calls to an API that requires (basic) authentication details to be passed, but can't find any way to do this with the standard net/rpc/jsonrpc
package. A clipped version of my non-authenticating code is below.
var reply string
netClient, _ = net.Dial("tcp", "localhost:1234")
jsonClient = jsonrpc.NewClient(netClient)
jsonClient.Call("someMethod", someArgs, &reply)