mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Replace http method strings with net/http constants (#14677)
This commit is contained in:
committed by
GitHub
parent
7f36a29e04
commit
0dd4cda7c9
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user