-
-
Save KevinGimbel/fbcdfbf8195594a157d7bcee3317d287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dependency as | |
// reqwest = { version = "0.10", features = ["blocking", "json"] } | |
use reqwest; | |
fn main() { | |
const TOKEN: &str = "actual_token_here"; | |
let client = reqwest::blocking::Client::new(); | |
let res = client | |
.get("https://api.github.com/repos/actual_user/actual_repo/releases/latest") | |
.header("Authorization", format!("token {}", TOKEN)) | |
.send()?; | |
println!("{:#?}", res); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment