Browse Source

Correct usage of reqwest headers

index-subcmd
Vincent Prouillet 6 years ago
parent
commit
9dca46cfd3
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      components/link_checker/src/lib.rs

+ 2
- 1
components/link_checker/src/lib.rs View File

@@ -55,7 +55,8 @@ pub fn check_url(url: &str) -> LinkResult {
} }


let mut headers = HeaderMap::new(); let mut headers = HeaderMap::new();
headers.insert(ACCEPT, "text/html, *".parse().unwrap());
headers.insert(ACCEPT, "text/html".parse().unwrap());
headers.append(ACCEPT, "*/*".parse().unwrap());


let client = reqwest::Client::new(); let client = reqwest::Client::new();




Loading…
Cancel
Save