GetNoRetry makes a GET request to the Proxmox API without retry logic but with timeout.
(path string, result *map[string]interface{})
| 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 { |
| 58 | ctx, cancel := context.WithTimeout(context.Background(), DefaultAPITimeout) |
| 59 | defer cancel() |
| 60 | |
| 61 | c.logger.Debug("API GET (no retry): %s", path) |
| 62 | |
| 63 | return c.httpClient.Get(ctx, path, result) |
| 64 | } |
| 65 | |
| 66 | // Post makes a POST request to the Proxmox API with timeout. |
| 67 | func (c *Client) Post(path string, data interface{}) error { |