add test response using rpc.WriteResponse

This commit is contained in:
2025-07-29 09:39:07 +03:00
parent 1f36f2d7bc
commit 0151c3f68a

View File

@@ -7,7 +7,11 @@ import (
) )
func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request, req rpc.RPCRequest) { func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request, req rpc.RPCRequest) {
w.Write([]byte("Sigmas")) rpc.WriteResponse(w, &rpc.RPCResponse{
JSONRPC: rpc.JSONRPCVersion,
ID: req.ID,
Result: "Hi",
}) // test answer to make sure everything works
} }
// func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request) { // func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request) {