From 4d9c6c1343cd0545490c3666c8530c7e604035e2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 27 Jul 2021 01:17:05 +0100 Subject: [PATCH] client: wip code Signed-off-by: Ian Jackson --- src/bin/client.rs | 13 +++++++++++++ src/prelude.rs | 1 + 2 files changed, 14 insertions(+) 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}; -- 2.30.2