From 66afd1dbc9e4a5d65f60fabbfb418e0ac2bbee97 Mon Sep 17 00:00:00 2001 From: David Hill Date: Thu, 5 Jun 2014 13:52:37 -0400 Subject: [PATCH] Use NewReader instead of NewBuffer. --- jsonfxns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonfxns.go b/jsonfxns.go index d87609c0..5bf2cfda 100644 --- a/jsonfxns.go +++ b/jsonfxns.go @@ -53,7 +53,7 @@ func jsonRpcSend(user string, password string, server string, message []byte, } credentials := user + ":" + password resp, err := client.Post(protocol+"://"+credentials+"@"+server, - "application/json", bytes.NewBuffer(message)) + "application/json", bytes.NewReader(message)) if err != nil { // We do not want to log the username/password in the errors. replaceStr := ":"