Skip to content

Commit 31b78f9

Browse files
committed
Add HTTP request Agent header #2
1 parent 81285e3 commit 31b78f9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

httpclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type transport struct {
1212
}
1313

1414
func (this *transport) RoundTrip(req *http.Request) (*http.Response, error) {
15-
agent := fmt.Sprintf("ConvertAPI-CLI/%d (%s)", Version, strings.Title(runtime.GOOS))
15+
agent := fmt.Sprintf("convertapi-cli%s/%d", strings.Title(runtime.GOOS), Version)
1616
req.Header.Add("User-Agent", agent)
1717
return this.RoundTripper.RoundTrip(req)
1818
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"os"
99
)
1010

11-
const Version = 1
11+
const Version = 2
1212
const Name = "convertapi"
1313
const HelpFlagName = "help"
1414

0 commit comments

Comments
 (0)