Imports github.com/elastic/beats/v7/libbeat/common/transport/httpcommon github.com/elastic/beats/v7/libbeat/common/useragent github.com/elastic/beats/v7/metricbeat/helper/dialer github.com/elastic/beats/v7/metricbeat/mb github.com/pkg/errors Standard library imports bufio bytes encoding/json fmt io io/ioutil net/http time