From: Ian Jackson Date: Mon, 22 Feb 2021 01:52:04 +0000 (+0000) Subject: tests: fetch client id, wip X-Git-Tag: otter-0.4.0~374 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6a9b6f362a2dbcc4fa691c6d10dcf56fce503f5b;p=otter.git tests: fetch client id, wip Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 6940cc49..35d7182f 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -24,7 +24,9 @@ struct Player { impl Player { #[throws(AE)] fn connect(&self) { - let body = reqwest::blocking::get(&self.url)?.text()?; + let resp = reqwest::blocking::get(&self.url)?; + ensure_eq!(resp.status(), 200); + let body = resp.text()?; let dom = scraper::Html::parse_document(&body); dbg!(&body, &dom); let clid = dom @@ -32,6 +34,8 @@ impl Player { .next().unwrap() .value().attr("data-ptoken"); dbg!(&clid); + + } }