Skip to content

Commit

Permalink
Set User-Agent from cli requests
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskuehl committed Nov 16, 2024
1 parent 410e595 commit a04b92a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/fpb/fpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Example usage:
return fmt.Errorf("creating request: %w", err)
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.Header.Set("User-Agent", "fpb/"+version)
if creds != nil {
req.SetBasicAuth(creds.Username, creds.Password)
}
Expand Down
1 change: 1 addition & 0 deletions cli/fput/fput.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var command = &cobra.Command{
return fmt.Errorf("creating request: %w", err)
}
req.Header.Set("Content-Type", writer.FormDataContentType())
req.Header.Set("User-Agent", "fput/"+version)
if creds != nil {
req.SetBasicAuth(creds.Username, creds.Password)
}
Expand Down

0 comments on commit a04b92a

Please sign in to comment.