Skip to content

Commit

Permalink
Merge pull request #75 from DeterminateSystems/fixup-login
Browse files Browse the repository at this point in the history
fh login: fixup status request
  • Loading branch information
cole-h authored Nov 6, 2023
2 parents cbe335f + 8d8e396 commit f0d3486
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cli/cmd/status/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::process::ExitCode;

use clap::Parser;
use color_eyre::eyre::WrapErr;
use reqwest::header::AUTHORIZATION;

use super::CommandExecute;

Expand Down Expand Up @@ -88,9 +89,11 @@ pub(crate) async fn get_status_from_auth_token(
let mut cli_status = api_addr;
cli_status.set_path("/cli/status");

let res = reqwest::Client::new()
let res = reqwest::Client::builder()
.user_agent(crate::APP_USER_AGENT)
.build()?
.get(cli_status)
.header("Authorization", &format!("Bearer {token}"))
.header(AUTHORIZATION, &format!("Bearer {token}"))
.send()
.await
.wrap_err("Failed to send request")?;
Expand Down

0 comments on commit f0d3486

Please sign in to comment.