Interact with the raw body from the request? #1016
Answered
by
chrislearn
TaQuanMinhLong
asked this question in
Q&A
-
Is there any API in salvo that allows us to interact with the body so we can pipe the bytes to upload to |
Beta Was this translation helpful? Give feedback.
Answered by
chrislearn
Jan 2, 2025
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TaQuanMinhLong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Body
itself implements theStream
trait. https://docs.rs/salvo_core/latest/salvo_core/http/body/enum.ReqBody.html#impl-Stream-for-ReqBodyIf you have never accessed methods such as
form_data
orfile
, theFormData
object will not be created and the related uploaded files will not be written to temporary files.