v0.1
This commit is contained in:
19
src/refresh.rs
Normal file
19
src/refresh.rs
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user