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:
parent
eba0da061f
commit
d783709a53
5
push.go
5
push.go
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user