How to pass axum request body to body of "reqwest"?

I'm trying to convert axum request body to reqwest body. I'm not able to do it

You should be able to pass an axum::body::Body to the reqwest::Body::wrap_stream method. What happens when you try that?

Edit: Actually, reqwest comes with this conversion built-in. It's implemented via the From trait here. Please give reqwest::Body::from(axum_body) a try instead.

1 Like

I rewrote in a different way itself. Anyway thanks for the info.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.