1
0
bot/src/refresh.rs

20 lines
420 B
Rust
Raw Normal View History

2023-10-20 14:31:16 +00:00
extern crate reqwest;
pub async fn post_request(refresh: String) -> String {
let url = "https://bsky.social/xrpc/com.atproto.server.refreshSession";
let client = reqwest::Client::new();
let res = client
.post(url)
.header("Authorization", "Bearer ".to_owned() + &refresh)
.send()
.await
.unwrap()
.text()
.await
.unwrap();
return res
}