Skip to content

Commit b225d19

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

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

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

0 commit comments

Comments
 (0)