
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
github.com/riftbit/jrpc2client
This is a json-rpc 2.0 client package for golang based on:
to get high perfomance
This package is still in development
package main
import (
"github.com/riftbit/jrpc2client"
)
type TestReply struct {
LogID string `json:"log_id"`
}
func main() {
client := jrpc2client.NewClient()
client.SetBaseURL("http://127.0.0.1:65001")
client.SetUserAgent("JsonRPC Test Client")
client.SetBasicAuth("user", "password")
dstT := &TestReply{}
err := client.Call("/api", "demo.Test", TestArgs{ID: "TESTER_ID_1"}, dstT)
if err != nil {
panic(err)
}
println(dstT.LogID)
}
package main
import (
"github.com/riftbit/jrpc2client"
)
type TestReply struct {
LogID string `json:"log_id"`
}
func main() {
logger := &logrus.Logger{
Out: os.Stdout,
Formatter: &logrus.JSONFormatter{DisableTimestamp: false},
Level: logrus.DebugLevel,
}
client := jrpc2client.NewClientWithLogger(logger)
client.SetBaseURL("http://127.0.0.1:65001")
client.SetUserAgent("JsonRPC Test Client")
client.SetBasicAuth("user", "password")
dstT := &TestReply{}
err := client.Call("/api", "demo.Test", TestArgs{ID: "TESTER_ID_3"}, dstT)
if err != nil {
panic(err)
}
println(dstT.LogID)
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.