mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
Add support for X-Deno-Warning header (#5161)
This commit is contained in:
parent
d5dd5ae87d
commit
eb505f8afc
4 changed files with 34 additions and 0 deletions
|
@ -117,6 +117,15 @@ pub fn fetch_once(
|
|||
|
||||
let mut headers_: HashMap<String, String> = HashMap::new();
|
||||
let headers = response.headers();
|
||||
|
||||
if let Some(warning) = headers.get("X-Deno-Warning") {
|
||||
eprintln!(
|
||||
"{} {}",
|
||||
crate::colors::yellow("Warning".to_string()),
|
||||
warning.to_str().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
for key in headers.keys() {
|
||||
let key_str = key.to_string();
|
||||
let values = headers.get_all(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue