Use NewReader instead of NewBuffer.
This commit is contained in:
parent
82e79619a5
commit
66afd1dbc9
1 changed files with 1 additions and 1 deletions
|
@ -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>"
|
||||||
|
|
Loading…
Reference in a new issue