From: Ian Jackson Date: Sat, 1 Feb 2025 12:43:17 +0000 (+0000) Subject: Switch to reqwest in the client (minor pre-reorg) X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=b08133397c64907dc210ede710430a737efcd73e;p=hippotat.git Switch to reqwest in the client (minor pre-reorg) Signed-off-by: Ian Jackson --- diff --git a/client/client.rs b/client/client.rs index 5b25ea7..e3a5716 100644 --- a/client/client.rs +++ b/client/client.rs @@ -149,11 +149,15 @@ fn submit_request<'r, 'c:'r, C:Hcc>( ) ); - let req = hyper::Request::post(&c.ic.url) - .header("Content-Type", r#"multipart/form-data; boundary="b""#) - .header("Content-Length", body_len) - .body(body) - .context("construct request")?; + let req = { + let ctype = r#"multipart/form-data; boundary="b""#; + let req = hyper::Request::post(&c.ic.url) + .header("Content-Type", ctype) + .header("Content-Length", body_len) + .body(body) + .context("construct request")?; + req + }; let resp = c.hclient.request(req); let fut = Box::pin(async move {