Closed brightly-salty closed 3 years ago
This and https://github.com/http-rs/http-types/pull/318 have the same approach now, with slightly different handling of filename-based MIME-type guessing. See the comment at https://github.com/http-rs/http-types/pull/318#issuecomment-766195364 for a summary.
Closing in favor of the similar implementation in https://github.com/http-rs/http-types/pull/318 , which additionally splits out path-based MIME-type guessing. But thank you very much for your work on this; much appreciated.
This PR renames
Body::from_file
toBody::from_path
, and addsBody::from_file
, which takes anasync_std::fs::File
like the name would suggest.Fixes #185.
Semver-major.