Use NewReader instead of NewBuffer.

This commit is contained in:
David Hill 2014-06-05 13:52:37 -04:00
parent 82e79619a5
commit 66afd1dbc9

View file

@ -53,7 +53,7 @@ func jsonRpcSend(user string, password string, server string, message []byte,
} }
credentials := user + ":" + password credentials := user + ":" + password
resp, err := client.Post(protocol+"://"+credentials+"@"+server, resp, err := client.Post(protocol+"://"+credentials+"@"+server,
"application/json", bytes.NewBuffer(message)) "application/json", bytes.NewReader(message))
if err != nil { if err != nil {
// We do not want to log the username/password in the errors. // We do not want to log the username/password in the errors.
replaceStr := "<username>:<password>" replaceStr := "<username>:<password>"