Get makes a GET request to the Proxmox API with retry logic and timeout.
(path string, result *map[string]interface{})
| 45 | |
| 46 | // Get makes a GET request to the Proxmox API with retry logic and timeout. |
| 47 | func (c *Client) Get(path string, result *map[string]interface{}) error { |
| 48 | ctx, cancel := context.WithTimeout(context.Background(), DefaultAPITimeout) |
| 49 | defer cancel() |
| 50 | |
| 51 | c.logger.Debug("API GET: %s", path) |
| 52 | |
| 53 | return c.httpClient.GetWithRetry(ctx, path, result, DefaultRetryCount) |
| 54 | } |
| 55 | |
| 56 | // GetNoRetry makes a GET request to the Proxmox API without retry logic but with timeout. |
| 57 | func (c *Client) GetNoRetry(path string, result *map[string]interface{}) error { |