mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
Replace http method strings with net/http constants (#14677)
This commit is contained in:
committed by
GitHub
parent
7f36a29e04
commit
0dd4cda7c9
@@ -44,7 +44,7 @@ func (c *Sys) ListPluginsWithContext(ctx context.Context, i *ListPluginsInput) (
|
||||
method := ""
|
||||
if i.Type == consts.PluginTypeUnknown {
|
||||
path = "/v1/sys/plugins/catalog"
|
||||
method = "GET"
|
||||
method = http.MethodGet
|
||||
} else {
|
||||
path = fmt.Sprintf("/v1/sys/plugins/catalog/%s", i.Type)
|
||||
method = "LIST"
|
||||
@@ -54,7 +54,7 @@ func (c *Sys) ListPluginsWithContext(ctx context.Context, i *ListPluginsInput) (
|
||||
if method == "LIST" {
|
||||
// Set this for broader compatibility, but we use LIST above to be able
|
||||
// to handle the wrapping lookup function
|
||||
req.Method = "GET"
|
||||
req.Method = http.MethodGet
|
||||
req.Params.Set("list", "true")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user