Skip to content

Commit ebe6b18

Browse files
committed
add user-agent header to all requests
1 parent 9e8f3de commit ebe6b18

File tree

1 file changed

+4
-0
lines changed
  • cpp-linter/src/rest_api/github

1 file changed

+4
-0
lines changed

cpp-linter/src/rest_api/github/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ impl RestApiClient for GithubApiClient {
100100
"Accept",
101101
HeaderValue::from_str("application/vnd.github.raw+json")?,
102102
);
103+
headers.insert(
104+
"User-Agent",
105+
HeaderValue::from_str("cpp-linter/cpp_linter_rs")?,
106+
);
103107
// headers.insert("User-Agent", USER_AGENT.parse().unwrap());
104108
if let Ok(token) = env::var("GITHUB_TOKEN") {
105109
let mut val = HeaderValue::from_str(token.as_str())?;

0 commit comments

Comments
 (0)