Browse Source

`Set` User-Agent header instead of `Add`ing it

Matt Baer 6 months ago
parent
commit
8728275c31
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      writeas.go

+ 1
- 1
writeas.go View File

@@ -191,7 +191,7 @@ func (c *Client) prepareRequest(r *http.Request) {
191 191
 	if ua == "" {
192 192
 		ua = "go-writeas v" + Version
193 193
 	}
194
-	r.Header.Add("User-Agent", ua)
194
+	r.Header.Set("User-Agent", ua)
195 195
 	r.Header.Add("Content-Type", "application/json")
196 196
 	if c.token != "" {
197 197
 		r.Header.Add("Authorization", "Token "+c.token)