The code in this chapter will use the standardized HTTP Client API classes from Java 11. If you are using the incubated HTTP Client from the previous Java versions, such as 9 or 10, all of the code in this chapter won't work as specified. A lot of method names have changed.
All of the code in this chapter can be accessed at https://github.com/PacktPublishing/Java-11-and-12-New-Features.
Before diving into the details, let's get a hang of the problem that led to the introduction of this new API for requesting HTTP resources.