🔨 Add 'User-Agent'in 'SetDefaults' function

This commit is contained in:
2025-03-22 22:25:54 +04:00
parent 11bb8b3fb0
commit 2a0ac390d8
4 changed files with 19 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ Flags:
-m, -method string HTTP Method for the request (default %s)
-b, -body [string] Body for the request (e.g. "body text")
-p, -param [string] Parameter for the request (e.g. "key1=value1")
-H, -header [string] Header for the request (e.g. "key1: value1")
-H, -header [string] Header for the request (e.g. "key1:value1")
-c, -cookie [string] Cookie for the request (e.g. "key1=value1")
-x, -proxy [string] Proxy for the request (e.g. "http://proxy.example.com:8080")`

View File

@@ -233,4 +233,5 @@ func (config *Config) SetDefaults() {
if config.Yes == nil {
config.Yes = utils.ToPtr(DefaultYes)
}
config.Headers.SetIfNotExists("User-Agent", DefaultUserAgent)
}