From 6a9b6f362a2dbcc4fa691c6d10dcf56fce503f5b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 22 Feb 2021 01:52:04 +0000 Subject: [PATCH] tests: fetch client id, wip Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); + + } } -- 2.30.2