use crate::http_client::HttpClient;
use crate::data_toml;
use crate::url;

pub async fn post_request() -> String {
    let refresh = data_toml(&"refresh");
    let url = url(&"session_refresh");
    let client = HttpClient::new();

    let auth_header = format!("Bearer {}", refresh);
    let headers = vec![("Authorization", auth_header.as_str())];
    let empty_json = serde_json::json!({});
    
    match client.post_with_headers(&url, &empty_json, headers).await {
        Ok(response) => response,
        Err(_) => "err".to_string(),
    }
}
