Closed tomkcey closed 7 months ago
Will close this issue because I have found a solution. I simply built the multipart body manually, in memory. This way it's a cloneable body and doesn't trigger the "You can't use a stream in the body", or somesuch.
It's not very elegant and there seems to be crates out there that could do the heavy lifting, so for anyone stumbling upon this make sure to take a look.
Bit of a bummer though. For my use case the transfered files are super small but for larger file sizes finding another solution is probably preferable.
Hi,
First, thanks for this crate. It's useful.
I'm encountering sort of an edge case where I'm consuming an API endpoint that requires digest auth and a
multipart/form-data
body.Upon sending the request with
send_with_digest_auth()
, I get the error as written in the title.I've been having some difficulty finding the same use case and solutions following some google search. Would you have a suggestion?
I'm passing a
Vec<u8>
toreqwest::multipart::Form
, and that buffer is acquired fromstd::fs::read()
.