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:
		 Anton Averchenkov
					Anton Averchenkov
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							7f36a29e04
						
					
				
				
					commit
					0dd4cda7c9
				
			| @@ -3,6 +3,7 @@ package api | ||||
| import ( | ||||
| 	"context" | ||||
| 	"fmt" | ||||
| 	"net/http" | ||||
| ) | ||||
|  | ||||
| // Help wraps HelpWithContext using context.Background. | ||||
| @@ -15,7 +16,7 @@ func (c *Client) HelpWithContext(ctx context.Context, path string) (*Help, error | ||||
| 	ctx, cancelFunc := c.withConfiguredTimeout(ctx) | ||||
| 	defer cancelFunc() | ||||
|  | ||||
| 	r := c.NewRequest("GET", fmt.Sprintf("/v1/%s", path)) | ||||
| 	r := c.NewRequest(http.MethodGet, fmt.Sprintf("/v1/%s", path)) | ||||
| 	r.Params.Add("help", "1") | ||||
|  | ||||
| 	resp, err := c.rawRequestWithContext(ctx, r) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user