diff options
Diffstat (limited to 'rpc/util.go')
-rw-r--r-- | rpc/util.go | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/rpc/util.go b/rpc/util.go index e5610dc2c..6eb1faefb 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -21,7 +21,7 @@ import ( "fmt" "io" "math/big" - "net/http" + // "net/http" "reflect" "time" @@ -106,24 +106,6 @@ func (self JsonWrapper) Send(writer io.Writer, v interface{}) (n int, err error) return writer.Write(payload) } -func (self JsonWrapper) ParseRequestBody(req *http.Request) (RpcRequest, error) { - var reqParsed RpcRequest - - // Convert JSON to native types - d := json.NewDecoder(req.Body) - defer req.Body.Close() - err := d.Decode(&reqParsed) - - if err != nil { - rpclogger.Errorln("Error decoding JSON: ", err) - return reqParsed, err - } - - rpclogger.DebugDetailf("Parsed request: %s", reqParsed) - - return reqParsed, nil -} - func toHex(b []byte) string { hex := common.Bytes2Hex(b) // Prefer output of "0x0" instead of "0x" |