diff --git a/plugins/outputs/http/README.md b/plugins/outputs/http/README.md index 69c6dd249..f30388fa8 100644 --- a/plugins/outputs/http/README.md +++ b/plugins/outputs/http/README.md @@ -33,7 +33,7 @@ to use them. ## Timeout for HTTP message # timeout = "5s" - ## HTTP method, one of: "POST" or "PUT" + ## HTTP method, one of: "POST" or "PUT" or "PATCH" # method = "POST" ## HTTP Basic Auth credentials diff --git a/plugins/outputs/http/http.go b/plugins/outputs/http/http.go index 77d55e654..57ff49968 100644 --- a/plugins/outputs/http/http.go +++ b/plugins/outputs/http/http.go @@ -85,7 +85,7 @@ func (h *HTTP) Connect() error { h.Method = http.MethodPost } h.Method = strings.ToUpper(h.Method) - if h.Method != http.MethodPost && h.Method != http.MethodPut { + if h.Method != http.MethodPost && h.Method != http.MethodPut && h.Method != http.MethodPatch { return fmt.Errorf("invalid method [%s] %s", h.URL, h.Method) } diff --git a/plugins/outputs/http/sample.conf b/plugins/outputs/http/sample.conf index 63cfd4fcc..742e1ae57 100644 --- a/plugins/outputs/http/sample.conf +++ b/plugins/outputs/http/sample.conf @@ -6,7 +6,7 @@ ## Timeout for HTTP message # timeout = "5s" - ## HTTP method, one of: "POST" or "PUT" + ## HTTP method, one of: "POST" or "PUT" or "PATCH" # method = "POST" ## HTTP Basic Auth credentials