Skip to content

Rename Body::from_file, add Body::from_file#296

Closed
brightly-salty wants to merge 2 commits intohttp-rs:mainfrom
brightly-salty:body-fs
Closed

Rename Body::from_file, add Body::from_file#296
brightly-salty wants to merge 2 commits intohttp-rs:mainfrom
brightly-salty:body-fs

Conversation

@brightly-salty
Copy link
Copy Markdown
Contributor

This PR renames Body::from_file to Body::from_path, and adds Body::from_file, which takes an async_std::fs::File like the name would suggest.

Fixes #185.

Semver-major.

@joshtriplett
Copy link
Copy Markdown
Member

This and #318 have the same approach now, with slightly different handling of filename-based MIME-type guessing. See the comment at #318 (comment) for a summary.

@joshtriplett
Copy link
Copy Markdown
Member

Closing in favor of the similar implementation in #318 , which additionally splits out path-based MIME-type guessing. But thank you very much for your work on this; much appreciated.

@brightly-salty brightly-salty deleted the body-fs branch January 24, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major This change requires a semver major change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Body::from_file should actually be Body::from_path, and Body::from_file should take a File

3 participants