Added DefaultClient for compatiblity (it's an alias for fetch)

This commit is contained in:
Tracker-Friendly 2024-10-28 10:01:30 +00:00
parent b9f75dd54f
commit 2086754a95
1 changed files with 3 additions and 0 deletions

View File

@ -314,6 +314,9 @@ var Fetch = &Client{
Timeout: 20 * time.Second, Timeout: 20 * time.Second,
} }
// DefaultClient is an alias for Fetch.
var DefaultClient = Fetch
func CanonicalHeaderKey(key string) string { func CanonicalHeaderKey(key string) string {
const allowedCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$%&'*+-.^_`|~" const allowedCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$%&'*+-.^_`|~"
for _, char := range []rune(key) { for _, char := range []rune(key) {