Align with the old behavior of the portal config request (#293)

This commit is contained in:
Kevin Yue
2024-01-21 18:31:39 +08:00
committed by GitHub
parent 1e211e8912
commit 7e372cd113
6 changed files with 46 additions and 58 deletions

View File

@@ -23,14 +23,8 @@ pub async fn gateway_login(
info!("Gateway login, user_agent: {}", gp_params.user_agent());
let res_xml = client
.post(&login_url)
.form(&params)
.send()
.await?
.error_for_status()?
.text()
.await?;
let res = client.post(&login_url).form(&params).send().await?;
let res_xml = res.error_for_status()?.text().await?;
let doc = Document::parse(&res_xml)?;