What's Changed
In the previous implementation, for the sake of performance, we used a lot of generics in the Client
and minimized the use of Box
. However, we found that this would make the Client
too complicated and the Client
-related errors difficult to understand.
To avoid the Client
type being too complicated, we used Box
in the outermost layer to wrap the inner dyn Future
, which would not have a high performance overhead while ensuring that the type is simple and easy to use.
Break Changes
- The complex type aliases have been removed, including:
ClientMetaService
ClientService
SimpleClient
DefaultClientOuterService
DefaultClient
- Generic types of
Client
has been changed from inner service (S
) to request body and response body (ReqBody
andRespBody
).- In most cases, users can use
Client
directly and ignore the generic types.
- In most cases, users can use
Others
This PR adds a debugging layer for unit tests. It will dump request and response via println
, and if any unit test fails, cargo
will print its output by default.
Detailed commits
- fix(examples): fixed http-tls examples by @eternaphia in #564
- fix(volo-http): fix
clippy::result_large_err
by @yukiiiteru in #568 - chore(volo-http): Wrap client service by
Box
by @yukiiiteru in #572
New Contributors
- @eternaphia made their first contribution in #564
Full Changelog: volo-http-0.3.1...volo-http-0.4.0-rc.1