Replace http method strings with net/http constants (#14677)

This commit is contained in:
Anton Averchenkov
2022-03-24 13:58:03 -04:00
committed by GitHub
parent 7f36a29e04
commit 0dd4cda7c9
26 changed files with 142 additions and 109 deletions

View File

@@ -4,12 +4,13 @@ import (
"bufio"
"context"
"fmt"
"net/http"
)
// Monitor returns a channel that outputs strings containing the log messages
// coming from the server.
func (c *Sys) Monitor(ctx context.Context, logLevel string) (chan string, error) {
r := c.c.NewRequest("GET", "/v1/sys/monitor")
r := c.c.NewRequest(http.MethodGet, "/v1/sys/monitor")
if logLevel == "" {
r.Params.Add("log_level", "info")