Releases: sagebind/isahc
Releases · sagebind/isahc
Full Send!
Another happy landing!
Welcome to a new decade!
This release includes a number of API improvements and features, as well as a couple bug fixes. The API changes improve ease of use and ergonomics, incorporating the new 0.2 version of the http
crate, as well as reduces the number of confusing types to help make finding what you are looking for easier in the documentation.
Breaking Changes
- Request configuration is now done via the
Configurable
trait, which unifies the old methods fromHttpClientBuilder
andRequestBuilderExt
into one place. The old methods have been removed, but most programs should compile without changes if the prelude is imported. (#48, #135) - Multiple breaking API improvements to
Body
(#143):Body::reader
andBody::reader_sized
have been renamed toBody::from_reader
andBody::from_reader_sized
, respectively.Body::bytes
has been replaced withBody::from_maybe_shared
, which uses type downcasting to accept aBytes
if given without having thebytes
crate being part of the public API.Body
no longer implementsFrom<Bytes>
for the reason above.Body::text
,Body::text_async
, andBody::json
have all been removed in favor of the equivalent methods provided byResponseExt
. This was done because the body alone is often not enough information to decode responses in a correct manner. (#142)
- Various improvements to request config bounds that accept more argument types.
- The
cookies
feature is no longer enabled by default. (#141) - Creating a
Body
from anAsyncRead
must now beSync
so thatBody
implementsSync
. (#172) - Response text decoding methods are now behind the
text-decoding
feature, enabled by default. (#156)
Added
- Handle more than just UTF-8 when decoding a response into text. (#90, #156)
- Add ability to bind to specific network interface. (#151, #155)
- Add ability to pre-populate DNS lookups with predefined mappings. (#114)
- Add Isahc logo to documentation. (#138) @jmjoy
Fixed
Body::is_empty
should not return true for a zero-length body that is present (as opposed to no body). (#144)- Upgrade curl-sys to fix static linking issues with older versions of macOS (#68, #169)
- Fix doctests and run cargo fmt (#160) @ggriffiniii
Changed
- Improve proxy handling test coverage (#167)
- Make default
VersionNegotiation
more conservative (#159, #164) - Set up code coverage analysis via grcov (#165)
Dependency Updates
- Upgrade http from 0.1 to 0.2 (#135)
- Update Public Suffix List to 11f4542
(#166) - Update indicatif requirement from 0.13 to 0.14 (#162) @dependabot-preview
- Update mockito requirement from 0.22 to 0.23 (#163) @dependabot-preview
- Update Public Suffix List to d73f42f
(#149) - Update bytes requirement from 0.4 to 0.5 (#132) @dependabot-preview
- Update Public Suffix List to a406942
(#137)
Dependency updates
Changed
- Don't ask for default features in
futures-util
because we do not use them. (#134) @jakobhellermann - Update parking_lot requirement from 0.9 to 0.10 (#133) @dependabot-preview
Version negotiation without HTTP/2
A Futures Fall
This release includes an upgrade to the much awaited futures 0.3, as well as some great new features and a few small breaking improvements to the API.
Breaking Changes
- Upgrade from futures-preview to futures 0.3. Largely the same as futures-preview, but a breaking change due to the crate switch. (#116) @sagebind
- The
preferred_http_version()
method has been removed in favor of a newVersionNegotiation
API with more robust configuration, including support for HTTP/2 Prior Knowledge. Generally this will be a mechanical migration frompreferred_http_version()
toversion_negotiation()
. If you were previously passing inVersion::HTTP_2
in order to enable HTTP/2 on insecure requests, you can now remove this as Isahc will include anUpgrade
header and switch to HTTP/2 automatically by default. (#129) @sagebind - A couple various boolean SSL options have been replaced with an
ssl_options()
method that permits you to set multiple flags with greater granularity and control. (#128) @sagebind
Added
- Added options for setting a CA certificate, disabling certificate revocation checks, and disabling proxies globally or for specific hosts. (#124) @ohadravid
- Document json feature in examples. (#121) @gbip
- Add a new API for HTTP auth. This includes a new crate feature
spnego
which allows you to configure HTTP Negotiate. Basic and digest auth are also supported. (#115) @sagebind
Changed
- Update mockito requirement from 0.21 to 0.22 (#123) @dependabot-preview
- Update crossbeam-utils requirement from 0.6 to 0.7 (#117) @dependabot-preview
- Update indicatif requirement from 0.12 to 0.13 (#119) @dependabot-preview
- Update crossbeam-channel requirement from 0.3 to 0.4 (#120) @dependabot-preview
Metrics API
Connection config and bugfixes
This release adds several new options for configuring connection behavior on an HttpClient
, as well as a couple important bug fixes.
Added
- Add options for configuring the connection cache (#95)
- Add option to configure DNS caching per client (#96)
- Add connection limit options for clients (#92)
Fixed
- Fix agent shutdown caused by unpause errors (#97, #101)
- Keep all instances of the same response header (#100, #107) @alexcormier
- Fix auto referer not setting referer header (#91)
Changed
Header value parsing fix
Fixed
- Fix parsing headers with a colon in their value. Previously headers like
Location: https://example.org
were being truncated toLocation: https
. (#82) @puckipedia
Changed
- Update env_logger requirement from 0.6 to 0.7. (#80)