Prometheus: Fix fallback http method when no http method specified in jsonData (#65229)

Use POST as default if no http method specified in jsonData
pull/65583/head
ismail simsek 2 years ago committed by GitHub
parent 906086c91b
commit 959349d191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkg/tsdb/prometheus/resource/resource.go

@ -30,6 +30,10 @@ func New(
}
httpMethod, _ := maputil.GetStringOptional(jsonData, "httpMethod")
if httpMethod == "" {
httpMethod = http.MethodPost
}
return &Resource{
log: plog,
promClient: client.NewClient(httpClient, httpMethod, settings.URL),

Loading…
Cancel
Save