Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement netty client using the new micronaut-core RawHttpClient (#989)
* Implement netty client using the new micronaut-core RawHttpClient This PR replaces most of the netty-based HTTP client that previously used the low-level micronaut-http-client ConnectionManager API with an implementation based on the new micronaut-http-client-core RawHttpClient introduced in micronaut-core 4.7.0. This offers some advantages: - Much simpler implementation. Once the legacy implementation is not needed anymore, all classes deprecated in this PR can be removed. - Possibility to work with non-netty RawHttpClient implementations, once those exist. In particular, this will allow using the JDK http client instead. - RawHttpClient runs normal micronaut-core ClientFilters, so we won't need the `OciNettyClientFilter` API anymore. While in theory the new implementation should be a drop-in replacement, it is possible that RawHttpClient differs slightly in behavior. For that reason, I've kept the old implementation around. It can be enabled by the `oci.netty.legacy-netty-client` config property, or the `io.micronaut.oraclecloud.httpclient.netty.legacy-netty-client` system property. This also means that MicronautHttpRequest and MicronautHttpResponse are actually mostly copied from NettyHttpRequest and NettyHttpResponse. Please consider that when reviewing, the actual changes are not that big. This PR works and is ready for review, but still needs a release of micronaut-core 4.7.0 (and of micronaut-serialization due to the unrelated micronaut-projects/micronaut-serialization#943 ). * review * small changes * fix test * try fixing test * trigger build --------- Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com>
- Loading branch information