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

@@ -2,6 +2,7 @@ package api
import (
"context"
"net/http"
"time"
)
@@ -13,7 +14,7 @@ func (c *Sys) LeaderWithContext(ctx context.Context) (*LeaderResponse, error) {
ctx, cancelFunc := c.c.withConfiguredTimeout(ctx)
defer cancelFunc()
r := c.c.NewRequest("GET", "/v1/sys/leader")
r := c.c.NewRequest(http.MethodGet, "/v1/sys/leader")
resp, err := c.c.rawRequestWithContext(ctx, r)
if err != nil {