title: How to use Hyper body channel?
body: <p>I am trying to make a POST HTTP request using the Hyper library, and then write data to it until I close it (from multiple functions/threads). I've found in documentation that I can use <code>Body::channel()</code> to do this, but I am using it improperly as I can only write to the channel once. I haven't found any examples, can someone please point me into the right direction?</p>
  <pre><code>let (mut sender, body) = Body::channel();
  
  let request = Request::builder()
      .method(Method::POST)
      .uri(&quot;http://localhost:3000/&quot;)
      .header(&quot;content-type&quot;, &quot;text&quot;)
      .body(body)
      .unwrap();
  
  let client = Client::new();
  let response = client.request(request);
  
  //Does get sent
  println!(&quot;Body: {:?}&quot;, sender.send_data(hyper::body::Bytes::from(&quot;test\n&quot;)).await);
  //Stuck on this one
  println!(&quot;Body: {:?}&quot;, sender.send_data(hyper::body::Bytes::from(&quot;test2\n&quot;)).await);
  //Debug print
  println!(&quot;{:?}&quot;, response.await);
  </code></pre>