Skip to content

Commit

Permalink
update header format
Browse files Browse the repository at this point in the history
  • Loading branch information
shwetharadhakrishna committed Apr 12, 2021
1 parent 60385c0 commit 41b68d3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,8 @@ func (c Client) SendRequest(method string, rawURL string, queryParams interface{

req.SetBasicAuth(c.basicAuth())

// go1.16 -> v1.16
goVersion = strings.Replace(goVersion, "go", "v", -1)

// E.g. "User-Agent": "twilio-go/1.0.0 (Go v1.16)"
userAgent := fmt.Sprint("twilio-go/", config.LibraryVersion, " (Go ", goVersion, ")")
// E.g. "User-Agent": "twilio-go/1.0.0 (go1.16)"
userAgent := fmt.Sprint("twilio-go/", config.LibraryVersion, " (", goVersion, ")")
req.Header.Add("User-Agent", userAgent)

if method == http.MethodPost {
Expand Down

0 comments on commit 41b68d3

Please sign in to comment.