O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction

Java's support for interacting with HTTP-specific features has been very primitive. The HttpURLConnection class, available since JDK 1.1, provides APIs for interacting with URLs with HTTP-specific features. Since this API has been there even before HTTP/1.1, it lacked advanced features and was a pain to use. This is why developers mostly resorted to using third-party libraries, such as Apache HttpClient, Spring frameworks, HTTP APIs, and so on. 

In JDK 9, a new HTTP client API is being introduced under JEP 110 (http://openjdk.java.net/jeps/110). Unfortunately, this API is being introduced as an incubator module (http://openjdk.java.net/jeps/11). An incubator module contains non-final APIs, which are significantly larger and not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required