Java in 24 Hours (8th Edition) Hour 21: Using Java 9's New HTTP Client

The cover of Teach Yourself Java in 24 Hours (8th Edition) by Rogers Cadenhead

Home Feedback Other Books Previous Hour Next Hour

Notes and Corrections

  • NetBeans 8.2 does not support Java 9. This hour requires a development version of NetBeans that can be downloaded from the nightly build section of
  • The jdk.incubator.httpclient module was renamed after the book went to print. It is now The HttpResponse.BodyHandler class was renamed to HttpResponse.BodyHandlers and its asString() method was renamed to ofString(). The HttpRequest.BodyProcessor class was renamed to HttpRequest.BodyPublisher and the HttpRequest.BodyProcessor method fromString() was replaced by the HttpRequest.BodyPublishers method ofString(). Finally, the top URL of this site has changed from "" to "". The,, and files have been updated to reflect these changes.

Source Files