mirror of
https://github.com/writeas/go-writeas.git
synced 2025-07-27 13:58:41 +00:00
Set
User-Agent header instead of Add
ing it
This commit is contained in:
parent
801952e0b5
commit
8728275c31
@ -191,7 +191,7 @@ func (c *Client) prepareRequest(r *http.Request) {
|
||||
if ua == "" {
|
||||
ua = "go-writeas v" + Version
|
||||
}
|
||||
r.Header.Add("User-Agent", ua)
|
||||
r.Header.Set("User-Agent", ua)
|
||||
r.Header.Add("Content-Type", "application/json")
|
||||
if c.token != "" {
|
||||
r.Header.Add("Authorization", "Token "+c.token)
|
||||
|
Loading…
Reference in New Issue
Block a user