🎨 style: change http/https header word/sentence casing (#555)

Currently all HTTP request headers are in snake case and upper case.
The adopted standard is kebab case and title case.

Here you will find more details:
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Standard_request_fields
This commit is contained in:
Todor Todorov 2024-04-25 20:31:47 +03:00 committed by GitHub
parent 9efcf0b079
commit 93fd8f8565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 28 deletions

View file

@ -54,14 +54,14 @@ impl SearchEngine for Brave {
};
let header_map = HeaderMap::try_from(&HashMap::from([
("USER_AGENT".to_string(), user_agent.to_string()),
("User-Agent".to_string(), user_agent.to_string()),
(
"CONTENT_TYPE".to_string(),
"Content-Type".to_string(),
"application/x-www-form-urlencoded".to_string(),
),
("REFERER".to_string(), "https://google.com/".to_string()),
("Referer".to_string(), "https://google.com/".to_string()),
(
"COOKIE".to_string(),
"Cookie".to_string(),
format!("safe_search={safe_search_level}"),
),
]))