From 7016fd3335c4ef48b2bb7f0f474eb3bed2f74f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Dohn=C3=A1lek?= Date: Fri, 8 Apr 2022 11:46:26 +0200 Subject: [PATCH] Use empty header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Dohnálek --- api/prometheus/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/prometheus/v1/api.go b/api/prometheus/v1/api.go index b68b69c25..e9242c845 100644 --- a/api/prometheus/v1/api.go +++ b/api/prometheus/v1/api.go @@ -1140,7 +1140,7 @@ func (h *apiClientImpl) DoGetFallback(ctx context.Context, u *url.URL, args url. req.Header.Set("Content-Type", "application/x-www-form-urlencoded") // Underlying `net.http` library automatically retries` idempotent requests when connectivity issues are hit. // POST requests are not considered idempotent by default, so we need to explicitly mark them as such. - req.Header.Set("Idempotency-Key", "TODO") + req.Header["Idempotency-Key"] = nil resp, body, warnings, err := h.Do(ctx, req) if resp != nil && (resp.StatusCode == http.StatusMethodNotAllowed || resp.StatusCode == http.StatusNotImplemented) {