Update
This commit is contained in:
parent
e4b5af4d64
commit
45feb2c5a5
1 changed files with 26 additions and 0 deletions
26
src/lib.rs
26
src/lib.rs
|
@ -783,6 +783,32 @@ impl Client {
|
|||
bail!("Report not finished");
|
||||
}
|
||||
|
||||
let mut records_url = self
|
||||
.webuntis_url
|
||||
.join(&format!("reports.do?{}", resp.data.report_params))?;
|
||||
dbg!(&records_url);
|
||||
records_url
|
||||
.query_pairs_mut()
|
||||
.append_pair("msgId", &resp.data.message_id.to_string());
|
||||
dbg!(&records_url);
|
||||
let records = reqwest::Client::new()
|
||||
.get(records_url)
|
||||
.header(reqwest::header::USER_AGENT, &self.user_agent)
|
||||
.header(reqwest::header::ACCEPT, "text/csv")
|
||||
.header(
|
||||
reqwest::header::COOKIE,
|
||||
self.session.as_ref().context("Not logged in")?,
|
||||
)
|
||||
.header(
|
||||
reqwest::header::AUTHORIZATION,
|
||||
Client::construct_bearer(&self.authorization.as_ref().context("Not logged in")?),
|
||||
)
|
||||
.send()
|
||||
.await?
|
||||
.text()
|
||||
.await?;
|
||||
dbg!(records);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue