hyper::Body::channel
let (sender, hyper_body) = hyper::Body::channel(); | |
let mut runtime = tokio::runtime::Runtime::new().unwrap(); | |
let handle = runtime.spawn(async { | |
parser::parse_and_send( | |
reader, | |
sender, | |
reference, | |
).await | |
}) | |
runtime.block_on(async move { | |
let client = reqwest::Client::builder() | |
.timeout(Duration::from_secs(480)) | |
.build() | |
.unwrap(); | |
let body = reqwest::Body::wrap_stream(hyper_body); | |
let response = self | |
.client | |
.post(url) | |
.body(body) | |
.send() | |
.await; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment