Issue Description
Type: feature request
Describe what happened (or what feature you want)
Sentinel currently only supports Apache HttpClient 4.x via sentinel-apache-httpclient-adapter. However, Apache HttpClient 5.x has been the recommended version since 2020, and HttpClient 4.x is now in maintenance mode.
I'd like to propose adding a new sentinel-apache-httpclient5-adapter module to support flow control for outgoing HTTP requests made with Apache HttpClient 5.x.
Key design points
- Integration approach: Implement
ExecChainHandler interface (HttpClient 5.x API), registered via HttpClientBuilder.addExecInterceptorBefore(). This is the idiomatic way to intercept requests in HttpClient 5.x, compared to the decorateMainExec() approach used in the 4.x adapter.
- Resource naming: Default format is
METHOD:url with query string and fragment stripped, consistent with the existing OkHttp adapter (DefaultOkHttpResourceExtractor).
- Extension points: Same pattern as the existing 4.x adapter — pluggable
ApacheHttpClientResourceExtractor for custom resource naming, ApacheHttpClientFallback for custom block handling.
- Minimum HttpClient version: 5.1 (provided scope dependency).
Describe what you expected to happen
A new module sentinel-apache-httpclient5-adapter is available for users who use Apache HttpClient 5.x.
Tell us your environment
- Sentinel version: master (2.0.0-alpha2-SNAPSHOT)
- Apache HttpClient 5.1+
- JDK 8+
Anything else we need to know?
I have an implementation ready and will submit a PR shortly.
Issue Description
Type: feature request
Describe what happened (or what feature you want)
Sentinel currently only supports Apache HttpClient 4.x via
sentinel-apache-httpclient-adapter. However, Apache HttpClient 5.x has been the recommended version since 2020, and HttpClient 4.x is now in maintenance mode.I'd like to propose adding a new
sentinel-apache-httpclient5-adaptermodule to support flow control for outgoing HTTP requests made with Apache HttpClient 5.x.Key design points
ExecChainHandlerinterface (HttpClient 5.x API), registered viaHttpClientBuilder.addExecInterceptorBefore(). This is the idiomatic way to intercept requests in HttpClient 5.x, compared to thedecorateMainExec()approach used in the 4.x adapter.METHOD:urlwith query string and fragment stripped, consistent with the existing OkHttp adapter (DefaultOkHttpResourceExtractor).ApacheHttpClientResourceExtractorfor custom resource naming,ApacheHttpClientFallbackfor custom block handling.Describe what you expected to happen
A new module
sentinel-apache-httpclient5-adapteris available for users who use Apache HttpClient 5.x.Tell us your environment
Anything else we need to know?
I have an implementation ready and will submit a PR shortly.