This commit is contained in:
2023-10-20 23:31:16 +09:00
parent 430b5977d8
commit fc863ad31d
6 changed files with 212 additions and 0 deletions

19
src/refresh.rs Normal file
View 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
}