From: Ian Jackson Date: Tue, 27 Jul 2021 00:17:05 +0000 (+0100) Subject: client: wip code X-Git-Tag: hippotat/1.0.0~435 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4d9c6c1343cd0545490c3666c8530c7e604035e2;p=hippotat.git client: wip code Signed-off-by: Ian Jackson --- diff --git a/src/bin/client.rs b/src/bin/client.rs index 912354c..bb147ac 100644 --- a/src/bin/client.rs +++ b/src/bin/client.rs @@ -77,6 +77,19 @@ async fn run_client(ic: InstanceConfig, hclient: Arc>) } assert!( to_process.is_none() ); dbg!(&reqs.len(), &upbound_total, &upbound.len()); + + let req = hyper::Request::post(&ic.url) + .body( + Itertools::intersperse( + upbound.into_iter().map(|u| Cow::from(u)), + Cow::from(&[SLIP_END] as &'static [u8]) + ) + ).context("construct request")?; + +// dbg!(&req); + +// hclient.request + /* Body made out of Stream diff --git a/src/prelude.rs b/src/prelude.rs index d87b2b0..2c96119 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -4,6 +4,7 @@ pub use std::collections::{BTreeSet, HashMap}; pub use std::convert::TryInto; +pub use std::borrow::Cow; pub use std::cmp::{min, max}; pub use std::fs; pub use std::fmt::{self, Debug, Display};