2023-10-20 14:31:16 +00:00
|
|
|
extern crate reqwest;
|
2024-02-07 01:52:09 +00:00
|
|
|
use crate::data_toml;
|
|
|
|
use crate::url;
|
2023-10-20 14:31:16 +00:00
|
|
|
|
2024-02-07 01:52:09 +00:00
|
|
|
pub async fn post_request() -> String {
|
|
|
|
let refresh = data_toml(&"refresh");
|
|
|
|
let url = url(&"session_refresh");
|
2023-10-20 14:31:16 +00:00
|
|
|
|
|
|
|
let client = reqwest::Client::new();
|
|
|
|
let res = client
|
|
|
|
.post(url)
|
|
|
|
.header("Authorization", "Bearer ".to_owned() + &refresh)
|
|
|
|
.send()
|
|
|
|
.await
|
|
|
|
.unwrap()
|
|
|
|
.text()
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
return res
|
|
|
|
}
|