diff options
Diffstat (limited to '')
-rw-r--r-- | src/go/plugin/go.d/modules/consul/collect.go (renamed from src/go/collectors/go.d.plugin/modules/consul/collect.go) | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/consul/collect.go b/src/go/plugin/go.d/modules/consul/collect.go index 3b5ebfd30..3033e046e 100644 --- a/src/go/collectors/go.d.plugin/modules/consul/collect.go +++ b/src/go/plugin/go.d/modules/consul/collect.go @@ -8,7 +8,7 @@ import ( "io" "net/http" - "github.com/netdata/netdata/go/go.d.plugin/pkg/web" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) const ( @@ -69,12 +69,11 @@ func (c *Consul) isServer() bool { } func (c *Consul) doOKDecode(urlPath string, in interface{}, statusCodes ...int) error { - req, err := web.NewHTTPRequest(c.Request.Copy()) + req, err := web.NewHTTPRequestWithPath(c.Request, urlPath) if err != nil { return fmt.Errorf("error on creating request: %v", err) } - req.URL.Path = urlPath if c.ACLToken != "" { req.Header.Set("X-Consul-Token", c.ACLToken) } |