Skip to content

Instantly share code, notes, and snippets.

@kevingimbel kevingimbel/main.rs Secret
Last active Apr 2, 2020

Embed
What would you like to do?
// 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
You can’t perform that action at this time.