Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file function to async_impl::multipart #2106

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

NaokiM03
Copy link

@NaokiM03 NaokiM03 commented Jan 23, 2024

Related to #646

Add file function to async_impl::multipart::{Form, Part}.

Notes

Since From<File> for Body was added in #1360, I decided to use the stream function that uses it internally.

This comment says the backend did not support chunked requests, but Transfer-Encoding: chunked should be accepted for HTTP/1.1.

@@ -104,7 +104,7 @@ impl Form {
///
/// ```no_run
/// # fn run() -> std::io::Result<()> {
/// let files = reqwest::blocking::multipart::Form::new()
/// let form = reqwest::blocking::multipart::Form::new()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable names were different from the entities and have been corrected.

}
});

let url = format!("http://{}/multipart/3", server.addr());
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know what these numbers mean.
Please let me know if there is something appropriate as I just incremented it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant