What's Changed
Considering that default Target
of Client
is used less frequently, but it makes Target
selection logic of Client
too complicated, we have removed default Target
of Client
in this version.
However, we have added TargetLayer
, it can force Client
to set a Target
, which can provide a similar experience as before.
With the removal of default Target
of Client
, configuration of default Host
is also removed. Here we adjust the original Host
Layer to be more flexible, which can be set to None
, Auto
, Force
, Fallback
modes.
The default callee name has been removed in favor of the with_callee_name
method of TargetLayer
. This is only necessary when accessing an HTTPS address via an IP address and needing to set up SNI.
Additionally, RequestBuilder::full_uri
has been removed. We recommend using a Layer
to implement this functionality rather than in RequestBuilder
, and an example will be pushed later.
Break Changes
- Remove default target related functions of
ClientBuilder
:ClientBuilder::address
ClientBuilder::host
ClientBuilder::with_port
ClientBuilder::with_scheme
ClientBuilder::target_ref
ClientBuilder::target_mut
- Refactor
Host
layer, andClientBuilder::default_host
is updated toClientBuilder::host_mode
- Remove
RequestBuilder::full_uri
Related Commits
- chore(volo-http): fix clippy warning
mismatched_lifetime_syntaxes
by @yukiiiteru in #576 - chore(volo-http): refactor target logics of http client by @yukiiiteru in #580
Full Changelog: volo-http-0.4.0-rc.2...volo-http-0.4.0-rc.3