diff --git a/analytics.go b/analytics.go index d0f089f..b713c29 100644 --- a/analytics.go +++ b/analytics.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "io/ioutil" + "strconv" "sync" "bytes" @@ -291,7 +292,7 @@ func (c *client) upload(b []byte) error { req.Header.Add("User-Agent", "analytics-go (version: "+Version+")") req.Header.Add("Content-Type", "application/json") - req.Header.Add("Content-Length", string(len(b))) + req.Header.Add("Content-Length", strconv.Itoa(len(b))) req.SetBasicAuth(c.key, "") res, err := c.http.Do(req)