push.go: clarify the docs for PushOptions.Method field

This is a follow-up for 9032bb9e48db368a333b968209ffb42c48a43d8b
Updates https://github.com/VictoriaMetrics/metrics/pull/70
This commit is contained in:
Aliaksandr Valialkin 2024-07-16 13:14:56 +02:00
parent eba0da061f
commit d783709a53
No known key found for this signature in database
GPG Key ID: 52C003EE2BCDB9EB

View File

@ -32,7 +32,8 @@ type PushOptions struct {
// By default the compression is enabled.
DisableCompression bool
// Method is an optional of HTTP request method.
// Method is HTTP request method to use when pushing metrics to pushURL.
//
// By default the Method is GET.
Method string
@ -301,7 +302,7 @@ func newPushContext(pushURL string, opts *PushOptions) (*pushContext, error) {
}
method := opts.Method
if len(method) == 0 {
if method == "" {
method = http.MethodGet
}