Skip to content

1.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Dec 20:30
· 110 commits to master since this release

Breaking Changes

  • The Body type has now been broken up into distinct AsyncBody and Body types, with the former implementing only AsyncRead and the latter implementing only Read. 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 synchronous Read sources such as a File 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 and ReadResponseExt. 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 separate ErrorKind 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 and Body::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.
  • Removed Request, Response, and HttpClient from the prelude module. You will now have to import these directly. Importing large prelude modules can make code more confusing to read and is usually considered an anti-pattern. (#281)

Fixed

  • Fix warning for aborting response body stream early being emitted inconsistently. Also change from a WARN to an INFO log. (#280)

Other Changes

  • The minimum supported Rust version (MSRV) is now pinned to 1.41. (#259)
  • Add post_async example usage and improve various method docs. (#273)
  • Add rustfmt config and apply rustfmt to the entire codebase. (#276, #277)
  • Add Clippy checks to CI. (#279)

Dependency Updates

  • Update Public Suffix List to f9f612a (#266)
  • Update flume requirement from 0.9 to 0.10 (#271)