Skip to content

Commit

Permalink
Merge pull request #6 from cego/added-user-agent
Browse files Browse the repository at this point in the history
Added a specific james user agent to http requests
  • Loading branch information
FnuGk authored Dec 22, 2020
2 parents d2b8038 + 494773d commit b9560d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func prerun(_ *cobra.Command, _ []string) {
func httpDo(req *http.Request) (*http.Response, error) {
backOff := time.Millisecond * 250

req.Header.Set("User-Agent", fmt.Sprintf("%s/1.0", strings.Title(appName)))
if req.Body != nil {
panic("httpDo() only supports requests without body")
}
Expand Down

0 comments on commit b9560d8

Please sign in to comment.