Skip to content

Commit

Permalink
Use empty header
Browse files Browse the repository at this point in the history
  • Loading branch information
dohnto committed Apr 8, 2022
1 parent 24c0864 commit a1b532e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/prometheus/v1/api.go
Expand Up @@ -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) {
Expand Down

0 comments on commit a1b532e

Please sign in to comment.