Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix: change get_subdomains to use POST method for token validation

Tonho7d929be512f1
diff --git a/src-tauri/src/platforms/hotmart/api.rs b/src-tauri/src/platforms/hotmart/api.rs
index 707ef863..0aa73c89 100644
--- a/src-tauri/src/platforms/hotmart/api.rs
+++ b/src-tauri/src/platforms/hotmart/api.rs
@@ -95,12 +95,12 @@ pub fn navigation_headers(token: &str, slug: &str, product_id: u64) -> HeaderMap
}
pub async fn get_subdomains(session: &HotmartSession) -> anyhow::Result<Vec<SubdomainInfo>> {
- let url = format!(
- "https://api-sec-vlc.hotmart.com/security/oauth/check_token?token={}",
- session.token
- );
-
- let resp = session.client.get(&url).send().await?;
+ let resp = session
+ .client
+ .post("https://api-sec-vlc.hotmart.com/security/oauth/check_token")
+ .form(&[("token", &session.token)])
+ .send()
+ .await?;
let status = resp.status();
let body_text = resp.text().await?;