)
);
- 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 {