ok2c commented on code in PR #852:
URL:
https://github.com/apache/httpcomponents-client/pull/852#discussion_r3613468022
##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java:
##########
@@ -161,17 +170,39 @@ public String generateKey(final HttpHost host, final
HttpRequest request) {
*/
public <T extends HttpRequest> String generateKey(final HttpHost host,
final T request,
- final Function<T,
byte[]> bodyExtractor) {
+ final Function<T,
SimpleBody> bodyExtractor) {
Review Comment:
@hunghhdev I would like to avoid a direct coupling with the `Simple*` APIs
because it is basically an intermediate layer intended to help transition from
the classic i/o to the async i/o. The project actually strongly discourages
its use. I may end up replacing it with the cache specific internal classes in
the future.
If you want to include the content-type in the content digest you can get it
from the request object as a header value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]