Skip to content

Commit

Permalink
fix: access_token_url should not be borrowed reference
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv committed Mar 22, 2024
1 parent 846d5aa commit 94213ab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/github_app_authentication_manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ async fn main() -> octocrab::Result<()> {

// By design, tokens are not forwarded to urls that contain an authority. This means we need to
// extract the path from the url and use it to make the request.
let access_token_path = Url::parse(installations[0].access_tokens_url.as_ref().unwrap())
.unwrap()
.path();
let access_token_url =
Url::parse(installations[0].access_tokens_url.as_ref().unwrap()).unwrap();

let access: InstallationToken = octocrab
.post(access_token_path, Some(&create_access_token))
.post(access_token_url.path(), Some(&create_access_token))
.await
.unwrap();

Expand Down

0 comments on commit 94213ab

Please sign in to comment.