The new HTTP client [JEP-110]
In this section, we will review Java's Hypertext Transfer Protocol (HTTP) client, starting with a pre-Java 9 look and then diving into the new HTTP client that is part of the Java 9 platform. This approach is needed to support an understanding of the changes made in Java 9.
The HTTP client before Java 9
JDK version 1.1 introduced the HttpURLConnection API that supported HTTP-specific features. This was a robust class that included the fields listed here:
chunkLengthfixedContentLengthfixedContentLengthLongHTTP_ACCEPTEDHTTP_BAD_GATEWAYHTTP_BAD_METHODHTTP_BAD_REQUESTHTTP_CLIENT_TIMEOUTHTTP_CONFLICTHTTP_CREATEDHTTP_ENTITY_TOO_LARGEHTTP_FORBIDDENHTTP_GONEHTTP_INTERNAL_ERRORHTTP_LENGTH_REQUIREDHTTP_MOVED_PERMHTTP_MOVED_TEMPHTTP_MULT_CHOICEHTTP_NO_CONTENTHTTP_NOT_ACCEPTABLEHTTP_NOT_AUTHORITATIVEHTTP_NOT_FOUNDHTTP_NOT_IMPLEMENTEDHTTP_NOT_MODIFIEDHTTP_OKHTTP_PARTIALHTTP_PAYMENT_REQUIREDHTTP_PRECON_FAILEDHTTP_PROXY_AUTHHTTP_REQ_TOO_LONGHTTP_RESETHTTP_SEE_OTHERHTTP_SERVER_ERROR...