no clone on strings
parent
e8677b8754
commit
bc6435e402
|
|
@ -100,9 +100,9 @@ impl<'a> ApiPoll<'a> {
|
||||||
.user_agent("api_grub/integration_module");
|
.user_agent("api_grub/integration_module");
|
||||||
let mut req = client.build().unwrap().get(&metrics.url);
|
let mut req = client.build().unwrap().get(&metrics.url);
|
||||||
|
|
||||||
let login = creds.endpoint.login.clone();
|
let login = &creds.endpoint.login;
|
||||||
let password = creds.endpoint.password.clone();
|
let password = &creds.endpoint.password;
|
||||||
let api_key = creds.endpoint.api_key.clone();
|
let api_key = &creds.endpoint.api_key;
|
||||||
// if !login.is_empty() && !password.is_empty() {
|
// if !login.is_empty() && !password.is_empty() {
|
||||||
// dbg!("kjgbkasgksjd");
|
// dbg!("kjgbkasgksjd");
|
||||||
// req = req.basic_auth(login, Some(password));
|
// req = req.basic_auth(login, Some(password));
|
||||||
|
|
@ -112,7 +112,7 @@ impl<'a> ApiPoll<'a> {
|
||||||
// req = req.header("authorization", "bearer ");
|
// req = req.header("authorization", "bearer ");
|
||||||
|
|
||||||
req = req.header("accept", "application/json");
|
req = req.header("accept", "application/json");
|
||||||
req = req.header("x-api-key", &api_key);
|
req = req.header("x-api-key", api_key);
|
||||||
|
|
||||||
// req = req.query(&["Bearer", "6fe8b0db-62b4-4065-9c1e-441ec4228341.9acec20bd17d7178f332896f8c006452877a22b8627d089105ed39c5baef9711"])
|
// req = req.query(&["Bearer", "6fe8b0db-62b4-4065-9c1e-441ec4228341.9acec20bd17d7178f332896f8c006452877a22b8627d089105ed39c5baef9711"])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue