chiark / gitweb /
client: wip code
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 27 Jul 2021 00:17:05 +0000 (01:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 27 Jul 2021 00:17:05 +0000 (01:17 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/client.rs
src/prelude.rs

index 912354ca9bcb08aa9a6b6fb6c4912400b142d702..bb147acc19c860bca1bd6829dfd11df28c084db1 100644 (file)
@@ -77,6 +77,19 @@ async fn run_client<C>(ic: InstanceConfig, hclient: Arc<hyper::Client<C>>)
           }
           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
index d87b2b051257aa300aaee00b83b5ea9143fd4258..2c961190307232696c00a41e1a7c463e5ef11abf 100644 (file)
@@ -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};