DEV Community

Discussion on: A small introduction to Java 11's HttpClient

Collapse
 
genadiivanov profile image
Genadi Ivanov

Hello,

Thanks for the small introduction, it is really fast and straight to the point.

I noticed a mistake and wanted to share it, so that you can fix it.
Section "Send GET in async way" second code example, line 1 should be:

future.thenAccept(this::processResponse);

The change is 'thenApply' -> 'thenAccept' as the referenced method "processResponse" is a Consumer, not a Function.

Cheers,
Genadi

Collapse
 
iuriimednikov profile image
Yuri Mednikov

Hi, Genadi! Thanks for your correction! I really appreciate feedback