1.0.0-beta.1
Pre-release
Pre-release
github-actions
released this
09 Dec 05:58
·
126 commits
to master
since this release
Breaking Changes
- The
Body
type has now been broken up into distinctAsyncBody
andBody
types, with the former implementing onlyAsyncRead
and the latter implementing onlyRead
. This was done to reduce confusion on how to produce and consume body content when in an asynchronous context without blocking. This also makes it possible to use synchronousRead
sources such as aFile
as a request body when using the synchronous API, something that was previously difficult to do. (#202, #262) - Methods on the
ResponseExt
trait related to reading the response body have been extracted into two new extension traits:AsyncReadResponseExt
andReadResponseExt
. Like the previous change, this was done to reduce confusion on which methods to use when consuming a response in an async context. The_async
suffix previously used to distinguish between the sync and async methods has been dropped, as it is no longer necessary. (#202, #262) - The
Error
type has been significantly refactored and changed into a struct with a separateErrorKind
enum. This was done to make it possible to add new errors without breaking changes, and to ensure that errors can always preserve upstream causes efficiently. The error kinds have also been updated to be clearer and more distinct. (#182, #258) - The
bytes
crate is no longer a dependency andBody::from_maybe_shared
has been removed. (#261) Configurable::dns_servers
has been removed, as it is more likely to confuse users more than anything since it requires libcurl to be compiled with c-ares, which it isn't by default and is unlikely to be.
Other Changes
- The minimum supported Rust version (MSRV) is now pinned to 1.41. (#259)