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

Expose a Form::into_reader() method on blocking multipart forms. #2524

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/blocking/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ impl Form {
Reader::new(self)
}

/// Produce a reader over the multipart form data.
pub fn into_reader(self) -> impl Read {
self.reader()
}

// If predictable, computes the length the request will have
// The length should be predictable if only String and file fields have been added,
// but not if a generic reader has been added;
Expand Down
Loading