This commit is contained in:
Dominic Grimm 2023-01-27 13:19:39 +01:00
parent 0ad1739d4f
commit 21009ada78
No known key found for this signature in database
GPG Key ID: 6F294212DEAAC530
1 changed files with 0 additions and 37 deletions

View File

@ -732,41 +732,4 @@ impl Client {
Ok(resp.data.elements)
}
pub async fn students(&self) -> Result<()> {
let resp = reqwest::Client::new()
.get(self.rpc_url.as_str())
.header(reqwest::header::USER_AGENT, &self.user_agent)
.header(reqwest::header::CONTENT_TYPE, "application/json")
.header(reqwest::header::ACCEPT, "application/json")
.header(
reqwest::header::COOKIE,
self.session.as_ref().context("Not logged in")?,
)
.json(&json!({
"id": "ID",
"method": "getStudents",
"params": {},
"jsonrpc": "2.0"
}))
.send()
.await?;
// .json()
// .await?;
// if let Some(e) = resp.error {
// bail!("RPC error: {:?}", e);
// }
dbg!(resp.text().await?);
// if let Some(x) = resp.result {
// Ok(x)
// } else {
// bail!("RPC result is null");
// }
Ok(())
}
// pub async fn exams(&self) -> Result<()> {
// Ok(())
// }
}